[英]Smart Sticky Navigation Menu
我在粘性菜單中跳來跳去出現一些小問題。 這是我的代碼: http : //jsfiddle.net/u6ywraj8/
如您所見,當用戶向下滾動時,我希望紅色的#menu
在頂部。 但是,菜單左上方的文本會跳來跳去。 我希望此文本始終位於紅色菜單的左上方,我不希望其具有初始的〜100px填充。
謝謝您的幫助!
添加float: left;
這堂課sticknav{}
sticknav {
background: #ffffff;
height: 30px;
width: 100%;
margin-right: 0px;
margin-left: 0px;
left: 0px;
right: 0px;
position: relative;
z-index: 9999;
float: left;
}
試試這個
sticknav {
background: none repeat scroll 0 0 #ffffff;
display: inline-block;
height: 30px;
left: 0;
margin-left: 0;
margin-right: 0;
position: relative;
right: 0;
width: 100%;
z-index: 9999;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.