2013-05-06 56 views
1

我发现这个有用HTML作为问题的答案约翻转图像由renocor(rollover a text hyperlink to become an image)为文本翻转图像超链接到成为一个文本行

<style> 
.changeable img 
{ 
    display:none; 
} 
.changeable:hover span 
{ 
    display:none; 
} 
.changeable:hover img 
{ 
    display:inline-block; 
} 
</style> 
<a href="http://www.example.com" class="changeable"><span>Hyper Text</span><img src="img.png" /></a> 

但我需要实现相反的效果。所以我倒转跨度与图像部分工作。这意味着,而不是图像,我看到的文字,但问题是,图像不会消失,但转移正文下方。

有什么建议吗? 感谢

.changeable span 
{ 
    display: none; 
} 
.changeable:hover image 
{ 
    display: none; 
} 
.changeable:hover span 
{ 
    display: inline-block; 
} 
</style> 
<a href="http://www.example.com" class="changeable"><span>Hyper Text</span><img src="img.png" /></a> 

回答

0

检查<style>,把IMG而不是图像,为我工作。

.changeable:hover img 
{ 
display: none; 
} 
+0

非常感谢,它的工作完美! – user2355145 2013-05-06 16:00:09

+0

不错,请按按钮接受答案:) – Sergio 2013-08-22 19:29:50