【发布时间】:2015-08-30 14:45:47
【问题描述】:
在媒体查询中
@media screen and (max-width: 300px) {
body {
background-color: lightblue;
}
}
这将在屏幕的最小宽度为 300 像素时执行。 如果我想在宽度介于 300px - 500px 之间时执行代码,我将如何编写代码。
【问题讨论】:
标签: css media-queries
在媒体查询中
@media screen and (max-width: 300px) {
body {
background-color: lightblue;
}
}
这将在屏幕的最小宽度为 300 像素时执行。 如果我想在宽度介于 300px - 500px 之间时执行代码,我将如何编写代码。
【问题讨论】:
标签: css media-queries
很简单
@media screen and (max-width: 359px) and (min-width: 240px){
.detail_image{height:160px; width:280px;}
.video_cntrl{height:160px; width:auto;}
}
我强烈建议您使用基于纵横比的分辨率,它会解决您的顾虑。
请view它。
【讨论】:
@media screen and (min-width: 300px) and (max-width: 500px)
{
body {
background-color: lightblue;
}
}
【讨论】: