文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
附录一 CSS3 响应式布局
媒体类型
*all
所有媒体braille
盲文触觉设备embossed
盲文打印机*print
手持设备projection
打印预览*screen
彩屏设备speech
‘听觉’类似的媒体类型tty
不适用像素的设备tv
电视
关键字
and
not
not
关键字是用来排除某种制定的媒体类型only
only
用来定某种特定的媒体类型
媒体特性
(max-width:600px)
(max-device-width: 480px)
设备输出宽度(orientation:portrait)
竖屏(orientation:landscape)
横屏(-webkit-min-device-pixel-ratio: 2)
像素比devicePixelRatio
设备像素比window.devicePixelRatio = 物理像素 / dips
样式引入
<link rel="stylesheet" href="css/index.css" media="print" />
@import url("css/demo.css") screen; @media screen{ }
<link rel=”stylesheet” media=”all and (orientation:portrait)” href=”portrait.css”>
<link rel=”stylesheet” media=”all and (orientation:landscape)”href=”landscape.css”>
@media screen and (min-width:360px) and (max-width:500px) {}
<link rel="stylesheet" type="text/css" href="indexA.css" media="screen and (min-width: 800px)">
<link rel="stylesheet" type="text/css" href="indexB.css" media="screen and (min-width: 600px) and (max-width: 800px)">
<link rel="stylesheet" type="text/css" href="indexC.css" media="screen and (max-width: 600px)">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论