CSS - UL背景不工作 [英] CSS - UL Background Not Working
本文介绍了CSS - UL背景不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于某些原因,当我尝试设置 UL
背景后台不工作。它工作在我的身体背景,但它不工作的 UL
。
For some reason when I try to set a UL
background the background doesn't work. It works on my body background but it isn't working for the UL
.
我知道我的图像命名正确。我有四次检查。这是我的代码:
I know my image is named correctly. I have quadruple checked that. Here is my code:
HTML
<html>
<head>
<title>Header</title>
<link rel="stylesheet" type="text/css" href="css/Style.css" />
</head>
<body>
<div id="page-wrap">
<ul id="nav">
<li><a href="#">Link1</a></li>
</ul>
<p>Main</p>
</div>
</body>
</html>
CSS
body
{
background-image: url('../Images/body-background.jpg');
}
#page-wrap
{
width:1040px;
margin: 0 auto;
}
ul#nav
{
margin: 0 auto;
width: 1040px; height: 185px;
background-image: url('../Images/header-logo.jpg');
background-repeat: no-repeat;
}
从 UL
本身不使用< a>
标签。没有它,Link1出现。有它,虽然没有出现。
From what it seems the UL
itself isn't working with the <a>
tag. Without it the "Link1" shows up. With it though nothing shows up. Either way the background isn't displaying.
感谢!
推荐答案
看起来像是对我有用。
五人组检查我的图片。
这篇关于CSS - UL背景不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文