为什么列表项li的背景图片显示不出来呢
时间:2010-07-24
来源:互联网
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
body {
background-image: url(image/WALLPAPER_FILE1024_200872817019.jpg);
background-repeat: no-repeat;
background-position:center 0;
}
ul li {
/*line-height: 200%;*/
display: inline;
background:transparent url(image/anniuchugaoj.jpg) no-repeat 0 0;
padding:0 0 0 0;
}
ul {
list-style-type: none;
margin-top: 55px;
padding:0;
width:760px;
left: 260px;
top: 10px;
margin-bottom: 10px;
position: fixed; /*margin-left: 250px;*/
}
</style>
</head>
<body>
<ul id="daohang">
<li>美食天地</li>
<li>爱优惠</li>
<li>关于我们</li>
<li>网友问题</li>
</body>
</html>
作者: loliah 发布时间: 2010-07-24
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <style type="text/css"> body { background-image: url(image/WALLPAPER_FILE1024_200872817019.jpg); background-repeat: no-repeat; background-position:center 0; } ul li { /*line-height: 200%;*/ display: inline; background:transparent url(http://dotnet.aspx.cc/images/rss.gif) no-repeat 0 0; padding:0 0 0 16px; } ul { list-style-type: none; margin-top: 55px; padding:0; width:760px; left: 260px; top: 10px; margin-bottom: 10px; position: fixed; /*margin-left: 250px;*/ } </style> </head> <body> <ul id="daohang"> <li>美食天地</li> <li>爱优惠</li> <li>关于我们</li> <li>网友问题</li> </body> </html>
作者: net_lover 发布时间: 2010-07-24
/*line-height: 200%;*/
display:block;
background:transparent url(image/anniuchugaoj.jpg) no-repeat 0 0;
padding:0 0 0 0;
}
试试!
作者: a89359511 发布时间: 2010-07-24
作者: loliah 发布时间: 2010-07-25
作者: huangyunzeng2008 发布时间: 2010-07-25
作者: loliah 发布时间: 2010-07-25
作者: WebAdvocate 发布时间: 2010-07-26
作者: emily1900 发布时间: 2010-07-26
作者: loliah 发布时间: 2010-07-26
作者: chenyuzou 发布时间: 2010-07-27
作者: richel1314 发布时间: 2010-07-27
背景图片是要设置它的宽度和高度的……
我这段代码应该怎么改?
作者: loliah 发布时间: 2010-07-27
作者: loliah 发布时间: 2010-07-28
作者: loliah 发布时间: 2010-07-28
IE和 Firefox里的显示效果不一样哦
要
ul
{
margin-left:0;
padding-left:0;
}
先
作者: sharpblade 发布时间: 2010-07-28
作者: loliah 发布时间: 2010-07-29
作者: loliah 发布时间: 2010-07-31
作者: LAWHK368 发布时间: 2010-07-31
IE和 Firefox里的显示效果不一样哦
设置了display: inline后,2个浏览器里都很难看的,
难道导航列表横向以后,li的背景图片就变成这样了呢?
作者: loliah 发布时间: 2010-08-01
作者: SugarChen2011 发布时间: 2011-10-23
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28