我正在尝试将 onmouseover 应用于 Angeline Jolie(示例图片),以更改上面显示“您的 Contrabang 每日剂量”的元素的文本(不要问)。实现这一点的最佳方法是什么?预先感谢您的帮助。可以参考JSFIDDLE http://jsfiddle.net/cntra/VSCXy/或者代码,如下:
<div class="columa">
<div id="text-display">
<span>Your Daily Dose of Contrabang</span>
</div>
<div class="morphing-tinting">
<span class="image-wrap"
style="position:relative;
left: 0px; top:0;
display:inline-block;
background:url
(http://www.howmuchdotheyweigh.com/wp-content/uploads/2011/02/angelina-jolie.jpg)
no-repeat center center;
width: 250px;
height: 250px;">
CSS:
#text-display{
top:; position: relative;
display:inline-block; padding:5px 10px;
font-family: sans-serif; font-weight:bold; font-size:50px;
color: white; text-align: center; line-height: 1.2em; margin:0px;
background-color:#E94F78;}
.morphing-tinting .image-wrap {
position: absolute;
-webkit-transition: 1s;
-moz-transition: 1s;
transition: 1s;
-webkit-border-radius: 30em;
-moz-border-radius: 30em;
border-radius: 30em;}
.morphing-tinting .image-wrap:hover {
-webkit-border-radius: 30em;
-moz-border-radius: 30em;
border-radius: 30em;}