Html 使悬停图像成为链接
不知道如何用词来表达标题,我正在尝试将图像作为链接,图像具有悬停“属性”,不知道如何用词来表达问题。Html 使悬停图像成为链接,html,css,Html,Css,不知道如何用词来表达标题,我正在尝试将图像作为链接,图像具有悬停“属性”,不知道如何用词来表达问题。 下面是我的代码: HTML 只需将您的span.imgswap放入 只要在标签周围扭曲标签,该图像将成为链接。示例 <div style="position: relative; left: 0; top: 0; bottom: 100px;"> <img src="pic\980_pcb.jpg" style="width:908.2px;height:398.05
下面是我的代码: HTML
只需将您的
span.imgswap
放入
只要在标签周围扭曲标签,该图像将成为链接。示例
<div style="position: relative; left: 0; top: 0; bottom: 100px;">
<img src="pic\980_pcb.jpg" style="width:908.2px;height:398.05px position: relative; top: 0; left: 0;" />
<span class="imgswap">
<a id="imgswap" href="#GPU"></a>
</span>
</div>
span.imgswap {
background - image: url("pic/gpu_replace.jpg") no - repeat;
height: 167 px;
width: 163 px;
position: absolute;
top: 132.5 px;
left: 286.5 px;
background - repeat: no - repeat;
display: block;
}
span.imgswap: hover {
background: url("pic/gpu_replace.jpg") no - repeat;
}
<a id="imgswap" href="#GPU"><span class="imgswap"></span></a>
<a class="link" href="#">
<img class="textimg" src="http://blackicemedia.com/presentations/2013-02-hires/img/awesome_tiger.svg" />
</a>
img.textimg {
height: 175px;
width: 175px;
}
img.textimg:hover {
background: black;
}