CSS3 Media
@media screen and (max-width: 960px){ body{ background: #000; } }
当页面小于960px,会改变背景。最大960px 区间应该在【0-960】
@media screen (min-width: 960px){ body{ background: #000; } }
当页面大于960px,会改变背景。最小960区间应该在【960 - 跟大】
@media screen and (min-width:960px) and (max-width:1200px){ body{ background:yellow; } }
这个区间在【960 --1200】之间。
<link rel="stylesheet" media="screen and (max-width:600px)" href="small.css" type="text/css" />
通过link引入样式,当屏幕小于600时,使用该样式
浙公网安备 33010602011771号