作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我在 CSS 中拉伸(stretch)背景时,填充会产生一条奇怪的黑线,我添加的填充越多,黑线就越大,这就是图像:
http://i61.tinypic.com/2ia7rlv.jpg
代码如下:
CSS:
/* reset browser styles */
html, body, div, span, 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%;
vertical-align: baseline;
}
/* end of browser styles */
@import url(http://fonts.googleapis.com/earlyaccess/notosanshebrew.css);
#logo {
padding-right: 10px;
padding-top: 10px;
}
nav {
background: rgba(0,0,0,.7);
padding: 2px;}
nav li {
display: inline;
padding: 0 20px;
}
nav ul {
list-style-type: none;
}
nav ul a{
text-decoration: none;
color: white;
}
nav a:hover {
color: rgb(207, 207, 207);
}
<!doctype html>
<html dir="rtl" lang="he-IL" prefix="og: http://ogp.me/ns#">
<head>
<meta charset="utf-8">
<title>SD עיצובים</title>
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">
<header div="mainHeader">
<nav div="mainNav">
<ul>
<img id="logo" src="images/title5.png"/>
<li><a href="index.html">דף הבית</a></li>
<li><a href="about.html">אודות</a></li>
<li><a href="jewelery.html">תכשיטים</a></li>
<li><a href="contact.html">צור קשר</a></li>
<ul>
<nav>
<header>
</div>
</body>
</html>
最佳答案
您的代码中有错字。而不是关闭 <nav>
用</nav>
你在<ul>
下新开一个元素。
关于html - 填充在我的 <ul> 上创建了奇怪的黑线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28501876/
我在 UISearchBar 的上方和下方出现了一些奇怪的黑线,我不太确定如何摆脱它们。将 UISearchBar 的样式设置为最小可以解决该问题,但它没有我想要的背景颜色。 知道是什么原因造成的吗?
在Firefox中,全屏模式下屏幕上方有一条1PX的黑线。 有什么办法可以用网站CSS代码去掉吗? 最佳答案 将以下代码片段添加到 your userChrome.css file使 1px 黑线完全
当在我的 View Controller (导航项中嵌入了大标题和搜索栏)上执行推/弹出转换时,黑线会短暂出现,如下所示: 我基本上尝试过更改所有与导航栏颜色相关的东西,但没有任何帮助。 任何帮助将不
我是一名优秀的程序员,十分优秀!