永发信息网

在这个代码中,加背景图片怎么加?

答案:2  悬赏:0  手机版
解决时间 2021-05-08 09:22
  • 提问者网友:你挡着我发光了
  • 2021-05-07 20:27

如题。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CSS Dock Menu</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/interface.js"></script>

<link href="style.css" rel="stylesheet" type="text/css" />

<!--[if lt IE 7]>
<style type="text/css">
.dock img { behavior: url(iepngfix.htc) }
</style>
<![endif]-->

</head>
<body>
<!--top dock -->
<div class="dock" id="dock">
<div class="dock-container">
<a class="dock-item" href="#"><img src="images/home.png" alt="home" /><span>Home</span></a>
<a class="dock-item" href="#"><img src="images/email.png" alt="contact" /><span>Contact</span></a>
<a class="dock-item" href="#"><img src="images/portfolio.png" alt="portfolio" /><span>Portfolio</span></a>
<a class="dock-item" href="#"><img src="images/music.png" alt="music" /><span>Music</span></a>
<a class="dock-item" href="#"><img src="images/video.png" alt="video" /><span>Video</span></a>
<a class="dock-item" href="#"><img src="images/history.png" alt="history" /><span>History</span></a>
<a class="dock-item" href="#"><img src="images/calendar.png" alt="calendar" /><span>Calendar</span></a>
<a class="dock-item" href="#"><img src="images/link.png" alt="rss" /><span>RSS</span></a>
<a class="dock-item" href="#"><img src="images/rss.png" alt="rss" /><span>RSS</span></a>
<a class="dock-item" href="#"><img src="images/rss2.png" alt="rss" /><span>RSS2</span></a>
</div>
</div>

<!--bottom dock -->
<div class="dock" id="dock2">
<div class="dock-container2">
<a class="dock-item2" href="#"><span>Home</span><img src="images/home.png" alt="home" /></a>
<a class="dock-item2" href="#"><span>Contact</span><img src="images/email.png" alt="contact" /></a>
<a class="dock-item2" href="#"><span>Portfolio</span><img src="images/portfolio.png" alt="portfolio" /></a>
<a class="dock-item2" href="#"><span>Music</span><img src="images/music.png" alt="music" /></a>
<a class="dock-item2" href="#"><span>Video</span><img src="images/video.png" alt="video" /></a>
<a class="dock-item2" href="#"><span>History</span><img src="images/history.png" alt="history" /></a>
<a class="dock-item2" href="#"><span>Calendar</span><img src="images/calendar.png" alt="calendar" /></a>
<a class="dock-item2" href="#"><span>Links</span><img src="images/link.png" alt="links" /></a>
<a class="dock-item2" href="#"><span>RSS</span><img src="images/rss.png" alt="rss" /></a>
<a class="dock-item2" href="#"><span>RSS2</span><img src="images/rss2.png" alt="rss" /></a>
</div>
</div>

<!--dock menu JS options -->
<script type="text/javascript">

$(document).ready(
function()
{
$('#dock').Fisheye(
{
maxWidth: 50,
items: 'a',
itemsText: 'span',
container: '.dock-container',
itemWidth: 40,
proximity: 90,
halign : 'center'
}
)
$('#dock2').Fisheye(
{
maxWidth: 60,
items: 'a',
itemsText: 'span',
container: '.dock-container2',
itemWidth: 40,
proximity: 80,
alignment : 'left',
valign: 'bottom',
halign : 'center'
}
)
}
);

</script>
</body>
</html>

最佳答案
  • 五星知识达人网友:佘樂
  • 2021-05-07 22:06

代码看不出来,有网址吗。想改那块的背景。看代码是一个菜单。一般修css . 应该在style.css

全部回答
  • 1楼网友:轮獄道
  • 2021-05-07 23:44

看这段:<body>,直接在里面添加背景图:<body background="图片路径">。

感觉你想要的不应该这么简单,能说清楚一点吗?

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯