您正在使用PX的響應式設計,而不是使用%
更新CSS //所有寬度%
nav{
height:50px;
width:100%;
}
nav ul{
padding:0;
margin: 0 auto; /*No Y-axis margin, Only an Auto X-axis margin, making the ul centered*/
width:80%;
}
nav li{
list-style:none; /*display:inline; also gets rid of the list styles*/
float:left; /*Floating the menu list items to the left so they will be
displayed horizontally side by side, but floating an element
will also cause their parent to collapse*/
dislay: inline-block;
min-width: 23%;
}
#navaside {
height:50px;
width:15%; /* Takes up 100% of the parent's width,
}
#navaside a#pull{
color:#fff; /* Color of the link */
display:inline-block; /* display:block (also)--Allows the width and line height to actually take affect */
width:100%; /* 5 elements at 140px = 700px, the width of the
}
檢查
您可以設計a或李根據您的要求,我剛剛修復了一些CSS,使其響應
jsfiddle.net/aF3Pd這是JSFiddle – cpuxtech
可能重複的[CSS導航欄定位元素](http://stackoverflow.com/questions/20929484/css-navigation-bar-positioning-elements) – halfer
我可以'如果你提出了兩個問題(然後很快再提出問題),或者你提出了一個問題(然後再重複問了三次),那麼問題就很有效。無論哪種方式,這裏都會有太多的複製和粘貼。請堅持只提問一次,如果您發現自己提出的問題類似但不完全相同,請在問題中注意避免關閉/降低提示。 – halfer