标签:body css ros lin span 屏幕 mic style 响应式
有多种使用方式:
<link rel="stylesheet" type="text/css" href="style.css" media="screen and (min-width: 800px)">
2、写在样式文件中,通过判断屏幕宽高适应不同分辨率
//适应宽度
@media screen and (max-width: 1365px) { body { font-size: 10px; } } @media screen and (min-width: 1366px) and (max-width: 1599px) { body { font-size: 12px; } } @media screen and (min-width: 1600px) and (max-width: 1919px) { body { font-size: 14px; } } @media screen and (min-width: 1920px) { body { font-size: 16px; } }
//适应高度
@media screen and (min-height: 901px) and (max-height: 1080px){ body { font-size: 16px; } }
@media screen and (min-height: 800px) and (max-height: 900px){
body {
font-size: 16px; } }
标签:body css ros lin span 屏幕 mic style 响应式
原文地址:http://www.cnblogs.com/zhouzhou826/p/7765720.html