我爱编程

Bootstrap-CSS3响应式布局

2018-02-24  本文已影响12人  ugvibib

两种方式:Media Queries 和

Media Queries


@media screen and (min-width: 600px){}    # 针对浏览器
@media screen and (max-width: 600px){}
 
@media screen and (max-device-width: 480){}    # 针对设备
@media screen and (min-device-width: 768){}

@media screen and (orientation: landscape){}    # 横屏
@media screen and (orientation: portrait){}    # 竖屏

@media screen and (min-width: 600px) and (min-width: 600px){}    # 组合


css3-mediaqueries.js

# 针对 IE6、IE7、IE8

上一篇下一篇

猜你喜欢

热点阅读