link rel="stylesheet" type="text/css" href="styleA.css" media="screen and (min-width: 400px)"含意是当显示屏的总宽超过相当于400px的情况下,运用styleA.css
link rel="stylesheet" type="text/css" href="styleB.css" media="screen and (min-width: 600px) and (max-width: 800px)"含意是当显示屏的总宽超过600低于800时,运用styleB.css
@media screen and (max-width: 600px) { /*当显示屏规格低于600px时,运用下边的CSS款式*/ .class { background: #ccc; }。
!DOCTYPE HTML html head meta charset="utf-8" meta name="viewport" content="width=device-width, initial-scale=1" / title css3-media-queries-demo /title style body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { padding: 0; margin: 0; .content{ zoom:1; .content:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; .leftBox, .rightBox{ float: left; width: 20%; height: 500px; margin: 5px; background: #ffccf7; display: inline; -webkit-transition: width 1s ease; -moz-transition: width 1s ease; -o-transition: width 1s ease; -ms-transition: width 2s ease; transition: width 1s ease; .middleBox{ float: left; width: 50%; height: 800px; margin: 5px; background: #b1fffc; display: inline; -webkit-transition: width 1s ease; -moz-transition: width 1s ease; -o-transition: width 1s ease; -ms-transition: width 1s ease; transition: width 1s ease; .rightBox{ background: #fffab1; @media only screen and (min-width: 1024px){ .content{ width: 1000px; margin: auto @media only screen and (min-width: 400px) and (max-width: 1024px){ .rightBox{ width: 0; .leftBox{ width: 30%} .middleBox{ width: 65%} @media only screen and (max-width: 400px){ .leftBox, .rightBox, .middleBox{ width: 98%; height: 200px; /style /head body div div /div div /div div /div /div /body /html
本站內容假如沒有标明出處,全部权均归本网站,出示完全免费免费下载使用,但不可用以商业服务赢利。假如标明出處,则来源于于互连网,本网站不做商业服务主要用途。假如本网站有內容侵害到您的利益,请致函网站站长电子邮箱,本网站当马上删掉。
联络大家刚开始科学研究响应式web设计方案,CSS3 Media Queries是新手入门。……
怎样挑选适合可靠的UI设计方案计划方案方案计划方案学习培训……
企业五大大的响应式知名品牌官方网站,您务必不用改动地彻……
wap企业网站建设要如何做才有特性,有什么方法?在高新科技大……
百度搜索seo排行提升:怎样提升网站加载速率,该如何做?倘若……
銆€銆€鎴垮湴浜т笟+it琛屼笟杞瀷鍙戝睍锛屽疄闄呬笂鍦ㄥ……