在hover
我希望我的图片和文字的不透明度变为0.5。但它只适用于图像,而不是文本:
a:hover {
opacity: 0.5;
cursor:pointer;
}

<a>
<img src="http://agriculture.vic.gov.au/__data/assets/image/0005/182390/rabbit_img1.jpg" style="max-height:90px">
<footer class="logo-footer">Matthew <cite>Rabbit</cite></footer>
</a>
&#13;
答案 0 :(得分:2)
<a>
<img src="http://agriculture.vic.gov.au/__data/assets/image/0005/182390/rabbit_img1.jpg" style="max-height:90px">
<footer class="logo-footer">Matthew <cite>Rabbit</cite></footer>
</a>
body {
background: red;
}
a:hover {
opacity: 0.5;
cursor:pointer;
}
a:hover footer {
opacity: 0.5;
}
这是一个工作小提琴。