我是编码的相对新手,但我正在建立一个Tumblr,让朋友看起来像一个专业网站。
导航栏是唯一给我带来麻烦的东西。我把它正确放置了,我已经用5种不同的方式创建了一个图像映射,但每次,链接都偏向左边,我不能,因为我的生活找到了问题。
以下是映射的代码:
<div style="display:block; width:2819px; height:242px; background:url(http://25.media.tumblr.com/ebc94124ba5998d21de08ddcb2e49a2c/tumblr_mtyjp4OLQH1sw93yro1_1280.png); position:absolute; margin:0px 0px; background-repeat: no-repeat;">
<map id="imgmap20139301813" name="imgmap20139301813"><area shape="rect" alt="" title="" coords="471,63,510,80" href="http://davidallanhowell.tumblr.com/homepage" target="_self" /><area shape="rect" alt="" title="" coords="541,63,590,79" href="http://davidallanhowell.tumblr.com/resume" target="_self" /><area shape="rect" alt="" title="" coords="622,63,662,79" href="http://davidallanhowell.tumblr.com/media" target="_self" /><area shape="rect" alt="" title="" coords="691,64,735,79" href="http://davidallanhowell.tumblr.com/studio" target="_self" /><area shape="rect" alt="" title="" coords="765,63,817,79" href="http://davidallanhowell.tumblr.com/contact" target="_self" /></map>
</style>
在我尝试修复它之前没有出现的第二个问题,现在我的图像上还有一个难看的灰色条。
帮助?
感谢并提前道歉,这可能是一个明显的问题。
答案 0 :(得分:0)
很抱歉这么说,但你的代码有点混乱!
为什么不删除图像映射,以及图像链接和使用html元素?
这段代码我将为您提供一个良好的开端供您使用!
<div style="display:block; width: 100%; height:242px; background:url(http://25.media.tumblr.com/ebc94124ba5998d21de08ddcb2e49a2c/tumblr_mtyjp4OLQH1sw93yro1_1280.png); position:absolute; margin:0px 0px; background-repeat: no-repeat;">
<ul style="
width: 361px;
height: 17px;
margin: 62px auto 0 auto;
border-bottom: 2px solid rgba(0,0,0,0.1);
">
<li style="
float: left;
margin: 0 15px;
">home</li>
<li style="
float: left;
margin: 0 15px;
">resume</li>
<li style="
float: left;
margin: 0 15px;
">media</li><li style="
float: left;
margin: 0 15px;
">studio</li>
<li style="
float: left;
margin: 0 15px;
">contact</li>
</ul>
</div>
希望有所帮助,任何问题都可以问!