1
我有一個桌面視圖,這是當鼠標懸停,一個.gif圖像將覆蓋完美的菜單。當設備寬度低於768px時,菜單響應正在工作,但是在顯示所有圖像而不是菜單的默認視圖的圖像疊加中出現問題。在html中響應的菜單
參考此鏈接以查看該設計http://testing.x-renaissance.com/
該網站的設計是使用HTML +引導
CSS
.overlay {
position: absolute;
bottom: 100%;
left: 0;
right: 0;
background-color: #000;
overflow: hidden;
width: 100%;
height: 100%;
transition: .5s ease;
text-align: center;
}
.overlay img { height: 50px; }
.nav-menu li:hover .overlay { bottom: 0; height: 100%; }
HTML
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" rel="Menu1" href="#" title="">
LOGO
</a>
</div>
<div id="navbar" class="collapse navbar-collapse navbar-responsive-collapse">
<ul class="nav navbar-nav nav-menu">
<li class="">
<a href="#" class="" title="Menu1">
<div class="overlay">
<img src="http://pa1.narvii.com/6050/e0e8fcb7950ad0fd900775fdde8e538ee00b88f8_hq.gif">
</div>
Menu1
</a>
</li>
<li>
<a href="#" class="h" title="Menu2">
<div class="overlay">
<img src="http://pa1.narvii.com/6050/e0e8fcb7950ad0fd900775fdde8e538ee00b88f8_hq.gif">
</div>
Menu2
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" title="Menu3">
<div class="overlay">
<img src="http://pa1.narvii.com/6050/e0e8fcb7950ad0fd900775fdde8e538ee00b88f8_hq.gif">
</div>
Menu3
</a>
</li>
<li>
<a href="#" class="" title="Menu4">
<div class="overlay">
<img src="http://pa1.narvii.com/6050/e0e8fcb7950ad0fd900775fdde8e538ee00b88f8_hq.gif">
</div>
Menu4
</a>
</li>
<li>
<a href="#" class="" title="Menu5">
<div class="overlay">
<img src="http://pa1.narvii.com/6050/e0e8fcb7950ad0fd900775fdde8e538ee00b88f8_hq.gif">
</div>
Menu5
</a>
</li>
<li>
<a href="#" class="" title="Menu6">
<div class="overlay">
<img src="http://pa1.narvii.com/6050/e0e8fcb7950ad0fd900775fdde8e538ee00b88f8_hq.gif">
</div>
Menu6
</a>
</li>
</ul>
</div>
</div>
</div>
當打開漢堡包菜單,bootstrap.min.js拋出的錯誤消息。 – Gerard