WEB页面适配不同分辨率下的屏宽问题

来源:互联网 发布:d3.js v4 教程 编辑:程序博客网 时间:2024/06/13 09:57

不同分辨率下写不同的样式。

使用@media元素

这样写
@media screen and (max-width:180pt) {html { font-size: 6pt }}
@media screen and (max-width:210pt)and (min-width:180pt) {html { font-size: 7pt }}
@media screen and (max-width:240pt)and (min-width:210pt) {html { font-size: 8pt }}
@media screen and (max-width:300pt)and (min-width:240pt) {html { font-size: 10pt }}
@media screen and (max-width:360pt)and (min-width:300pt) {html { font-size: 12pt }}
@media screen and (max-width:450pt)and (min-width:360pt) {html { font-size: 15pt }}
@media screen and (min-width:450pt) {html { font-size: 18pt; }}


例子如:http://www.strengthspartnership.com/ 


0 0
原创粉丝点击