我想让图像的标题在图像悬停时出现(这不是必需的是一个真正的标题)。文字应该从左到右出现,因此它的容器应该随着图像的悬停而在X轴上生长。我已经能够让文字出现在悬停中,但过渡效果是我卡住的地方。
这是我曾尝试:文字从左到右出现
CSS:
.morbid {
display: none;
margin-left:10px;
}
a:hover + .morbid {
position:relative;
display: block;
}
HTML:
<a>
<img src='.../goals/sia.png'>
</a>
<div class="morbid">
This text will appear as you hover your mouse over the image.
</div>
其实整个div
必须发展壮大,文字剩余静,我想文被隐藏,除非图像被徘徊。
你为什么要接受的答案吗? – Harry
'display'不是[** animatable properties **](http://www.w3.org/TR/css3-transitions/#animatable-properties) – Leo