@media only screen and (min-width:1080px) /*屏幕尺寸 1080+ 时应用该规则*/
@media only screen and (min-width: 640px) and (max-width: 1080px) /*屏幕尺寸 640~1080 时应用该规则*/
@media only screen and (max-width:640px) /*屏幕尺寸 0~640 时应用该规则*/
@media only screen and (min-width: 640px) and (max-width: 1080px) /*屏幕尺寸 640~1080 时应用该规则*/
@media only screen and (max-width:640px) /*屏幕尺寸 0~640 时应用该规则*/
2016-10-09
如果不想用<div class="col-sm-9">占位,在col-sm-3 后面加上 col-sm-offset-9 也是可以的。
2016-10-09
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2016-10-09
JavaScript 动态获取屏幕宽度
window.onresize = function() {
var device_width = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
document.getElementsByTagName("title")[0].innerText = "width: " + device_width + " px";
}
window.onresize = function() {
var device_width = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
document.getElementsByTagName("title")[0].innerText = "width: " + device_width + " px";
}
2016-10-09