我有一张图片作为链接。问题是可点击区域比图像本身大得多。为什么这样,我该如何解决?
<a target="_blank" href="http://my.ge.com"><img class="logo" src="../Content/images/always_on_logo.jpg"></a>
<style type="text/css">
img.logo {
display: block;
margin-left: 351px;
margin-right: 351px;
height: 50px;
width: 135px;
}
</style>
答案 0 :(得分:1)
删除display:block;
img.logo {
margin-left: 351px;
margin-right: 351px;
height: 50px;
width: 135px;
}
<a target="_blank" href="http://my.ge.com">
<img class="logo" src="../Content/images/always_on_logo.jpg" />
</a>