使用例子:
@media screen and (min-width:992px){
.carousel{
height: 500px;
margin-bottom: 30px;
}
.carousel .item{
height: 500px;
}
.collapse{display: block;}
.literature-item img{
width: 100%;
}
}
@media screen and (max-width:992px){
.collapse{display: none;}
.carousel{
height: 205px;
margin-bottom: 30px;
}
.carousel .item{
height: 215px;
}
.returntotop{
width: 10%;
height: 10%;
}
}
用法解释:上面代码的两个选择器hack实现的就是区分css样式在大屏幕和小屏幕时候选择的样式。