如何使用媒体查询在div内显示无div
ID =" flexnav菜单按钮" 我想隐藏这个媒体屏幕470px;
<header class="main">
<div class="container">
<div class="row">
<div class="span2">
<a href="index.aspx">
<img class="logo" title="just search4u" alt="justsearch4u.com"
style="width: 158px; height: 114px; margin-top: -19px" src="../Images/justsearchforu1.png">
</a>
</div>
<div class="span8">
<!-- MAIN NAVIGATION -->
<div class="flexnav-menu-button" id="flexnav-menu-button" >Menu</div>
<nav>
<ul class="nav nav-pills flexnav" id="flexnav" runat="server" data-breakpoint="800">
<li id="a" runat="server" class="active"><a href="Index.aspx"><b style="color: #000" class="index_head">Home</b></a>
</li>
<li id="b" runat="server"><a href="about.aspx"><b style="color: #000" class="index_head">About</b></a></li>
<li id="c" runat="server"><a href="contact.aspx"><b style="color: #000" class="index_head">Contact</b></a>
</li>
</ul>
</nav>
答案 0 :(得分:1)
试试这个:
@media screen and (max-width: 470px) {
#flexnav-menu-button {
display:none;
}
}