我正试图让我的导航栏转到页面的末尾,我遇到了麻烦。
我的导航栏是渐变的,我已经尝试过一些东西让它从页面的最左侧进入右侧的最后一侧,请问有什么帮助吗?
CSS:
.nav ul {
list-style-type:none;
margin:0px;
padding:0px;
}
.nav li {
float:left;
}
.nav a:link, a:visited {
display:block;
width: %100;
font-weight:bold;
color: #FFFFFF;
background-color:#363636;
background-image:url('../images/nav.png');
background:-webkit-gradient(linear,left top,left bottom,from(#363636),to(#0A0A0A));
background:-webkit-linear-gradient(top,#363636,#0A0A0A);
background:-moz-linear-gradient(top,#363636,#0A0A0A);
background:-o-linear-gradient(top,#363636,#0A0A0A);
background:-ms-linear-gradient(top,#363636,#0A0A0A);
background:linear-gradient(top,#363636,#0A0A0A);
text-align: center;
padding: 10px;
padding-left: auto;
padding-right: auto;
text-decoration:none;
}
.nav a:hover, a:active {
color: #FFFFFF;
background-color:#0A0A0A;
background:-webkit-gradient(linear,left top,left bottom,from(#363636),to(#363636));
background:-webkit-linear-gradient(top,#0A0A0A,#363636);
background:-moz-linear-gradient(top,#0A0A0A,#363636);
background:-o-linear-gradient(top,#0A0A0A,#363636);
background:-ms-linear-gradient(top,#0A0A0A,#363636);
background:linear-gradient(top,#0A0A0A,#363636);
}
答案 0 :(得分:0)
由于您在查看代码后从问题的标题中提到Width
,请尝试更改:
width: %100;
到
width: 100%;