0
我在aspx页面中有HTML/CSS内容。仅在移动视图中隐藏特定的div
我想要一个特定的div部分(包括一些CSS类)来切换到移动视图时隐藏。
我已经尝试使用以下:
设置引导属性:
@media screen and (max-width: 600px){}
和设置CSS /类属性:
{visibility: hidden;}
但是当测试的代码,它躲到该div永久。
代码引导:
@media screen and (min-width: 768px)
.col-md-7 {
width: 58.33333333%;
}
.service {
background: #005366;
color: #999;
margin-bottom: 10px;
}
.service h4 a{
color: #fff;
}
.service img {
float: right;
margin-left: 10px;
-webkit-transition: all 0.3s ease 0.1s;
-moz-transition: all 0.3s ease 0.1s;
-ms-transition: all 0.3s ease 0.1s;
-o-transition: all 0.3s ease 0.1s;
transition: all 0.3s ease 0.1s;
}
.service img:hover {
opacity: .9;
}
.service-in {
padding: 15px 0 0 10px;
min-height: 150px;
}
预先感谢您。
您试图隐藏哪个类/元素?你有没有尝试显示:没有,而不是可见性:隐藏? – L4zl0w