我正在使用我使用this example转换为wordpress主题的bootstrap。 网站网址为fuenterprises.com 我为导航栏定制的css是:
.navbar-wrapper {
margin-top: 33px;
}
.navbar-wrapper .navbar {
margin: 0 0 0 100px;
width: 91.3%;
}
.navbar-brand-logo {
float: left;
font-size: 18px;
height: 50px;
line-height: 20px;
padding: 1px 0 0 0;
}
.featurette-heading {
margin-top: 0;
}
.featurette-heading a {
color: inherit;
}
.img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img {
display: block;
height: auto;
max-width: 100%;
border: 1px dashed;
}
现在,当我在移动设备中打开网站时,没有按预期显示菜单,请参阅屏幕截图:
问题是如何在移动设备中禁用图像?
答案 0 :(得分:1)
将其包裹在容器中
<div class="disable-on-mobile"> <!-- my image --> </div>
添加带有媒体查询的CSS(取决于你想要隐藏的时间改变宽度)
@media (max-width: 900px){
.disable-on-mobile {
display: none;
}
}
您也可以将该课程添加到您的图片中......