gpt4 book ai didi

html - 最后一个左边框显示不正确

转载 作者:太空宇宙 更新时间:2023-11-04 02:58:55 24 4
gpt4 key购买 nike

我的问题是在 nav 中,li 的最后一个 border-left 显示不正确,我不知道为什么。谁能帮我解决这个问题

我的问题的屏幕截图(缺少最后一个左边框):

Border missing

这是我的代码:

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn,
em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas,
details, embed, figure, figcaption, footer, header, hgroup, menu, nav,
output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup,
menu, nav, section {
display: block;
}

body {
line-height: 1;
}

ol, ul {
list-style: none;
}

blockquote, q {
quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
content: '';
content: none;
}

table {
border-collapse: collapse;
border-spacing: 0;
}

/* END RESET */
/* *{
margin: 0; padding: 0; border: none;
} */

nav{
clear: both; /* faire un clear pour revenir a la ligne */
width: 960px;
height: 50px;

/* -moz-border-radius: 30px;
-webkit-border-radius: 30px;
background-color: #3b7c33; */

/* Fallback */

border-radius: 30px; /* dora 3la kolchi /*
/* couleur degradé /*
/* Safari 4+, Chrome 1-9 */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#5fae53), to(#3b7c33));
/* Safari 5.1+, Mobile Safari, Chrome 10+ */
background-image: -webkit-linear-gradient(top, #5fae53, #3b7c33);
/* Firefox 3.6+ */
background-image: -moz-linear-gradient(top, #5fae53, #3b7c33);
/* IE 10+ */
background-image: -ms-linear-gradient(top, #5fae53, #3b7c33);
/* Opera 11.10+ */
background-image: -o-linear-gradient(top, #5fae53, #3b7c33);

border: 1px solid #336c2b;


}
nav ul li
{
float:left;
border-right:1px solid #539948;
border-left: 1px solid #336c2b;
}

nav ul li a{
display: block;
padding: 0 30px;
height: 50px;
line-height: 50px;
font-size: 15px;
color: #fff;
text-decoration: none;
text-shadow: 0 1px 0 #387031;
}
nav ul li a:hover{

background: #5fae53;
}
nav ul li.home{
background: url(images/home.png) no-repeat 50% 50%;
text-indent: -9999px;
border-left: none;

}

nav ul li.home a:hover{
/* -webkit-border-top-left-radius: 30px;
-webkit-border-bottom-left-radius: 30px;
*/

border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
background: #5fae53 url(images/home.png) no-repeat 50% 50%;
}

nav ul li.last{

border-left: none;
border-right: none;
float: right;
margin-right: 20px;
}
<div id='header-wrap'>
<header>


<nav>
<ul>
<li class="home"><a href="#" title="">Home</a></li>
<li><a href="#" title="">Services</a></li>
<li><a href="#" title="">About Us</a></li>
<li><a href="#" title="">Testimonials</a></li>


</ul>
</nav>
</header>
</div>

jsfiddle中的代码

提前致谢

最佳答案

nav ul li.home 中删除这一行

text-indent: -9999px;

查看此 fiddle

关于html - 最后一个左边框显示不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31662309/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com