我有一个穿过页面的css菜单,我有几个块穿过,我想要它,这样当窗口最小化时,菜单保持不变并且不会最小化
是窗口未最小化时的样子
当页面最小化时会发生什么,我想要它以便菜单被切断并且不会重新调整。我也不知道如何让菜单块(主页、排名...)到页面的中心,它们留在一边
这是我的CSS代码
@charset "UTF-8";
/* CSS Document */
body, div, h1, h2, h3, h4, h5, h6, p, ul, ol, li, dl, dt, dd, img, form, fieldset, input, textarea, blockquote {
margin: 0; padding: 0; border: 0;
}
body {
font-family: Brixton , sans-serif; font-size: 22px; line-height: 0px;
// controls the text size, color, font
}
nav ul ul {
display: none;
//sets menu dislpay setting
}
nav ul li:hover > ul {
display: block;
//displays the block under the main tabs in the menu
}
nav ul {
background: #efefef;
background: linear-gradient(top, #efefef 0%, #bbbbbb 100%);
background: -moz-linear-gradient(top, #efefef 0%, #bbbbbb 100%);
background: -webkit-linear-gradient(top, #efefef 0%,#bbbbbb 100%);
box-shadow: 0px 0px 9px rgba(0,0,0,0.15);
//change menu background
padding: 0 20px;
list-style: none;
position: relative;
}
nav ul:after {
content: ""; clear: both; display: block;
//displays the background
}
nav ul li {
float:left;
//decides which side the menu is on
}
nav ul li:hover {
background: #4b545f;
background: linear-gradient(top, #4f5964 0%, #5f6975 40%);
background: -moz-linear-gradient(top, #4f5964 0%, #5f6975 40%);
background: -webkit-linear-gradient(top, #4f5964 0%,#5f6975 40%);
//changes the color of the menu when hovered over
}
nav ul li:hover a {
color: #fff;
}
nav ul li a {
display: block; padding: 25px 53px;
color: #007FFF; text-decoration: none;
}
nav ul ul {
background: #5f6975; border-radius: 0px; padding: 0;
position: absolute; top: 100%;
}
nav ul ul li {
float: none;
border-top: 1px solid #6b727c;
border-bottom: 1px solid #575f6a; position: relative;
}