一切都是从这两个代码开始的
#Header .Logo
{
background: url('http://s24.postimg.org/69nibdvz9/Header_P .png') no-repeat 0px 0px;
height: 186px;
width: 100%;
position:relative;
top: 0px;
margin: 0px 0px -5px;
clear: both;
和
<div class="Logo"><center><img src="http://s1.postimg.org/g6dji2wfj/Logo.png" style="position: relative; top: 50px;" width="640" height="160" alt="{SourceTitle}" /></center>
</div>
基本上我有一个标题和我网站的标志在它上面。因为我使用的是 Logo 而不是标题,所以我希望图像具有链接。所以我补充说:
<div class="Logo"><center> <a href="http://oldtimesdaily.tumblr.com"><img src="http://s1.postimg.org/g6dji2wfj/Logo.png" style="position: relative; top: 50px;" width="640" height="160" alt="{SourceTitle}" /></a></center>
</div>
现在的问题是链接创建的下划线很难看。我该如何删除它?我尝试在 .Logo 和本身中添加“style="text-decoration:none;",但没有任何区别。有什么帮助吗?
最佳答案
试试这个:
a.Logo:link, a.Logo:visited {
text-decoration: none
}
关于html - 从超链接图像中删除下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17199793/