我正在嘗試使其懸停在母體或sliding_child上時,sliding_child的位置移至sliding_child的下半部分。請注意,身高是母親的兩倍。懸停時更改Y位置
HTML
<div class="mother">
<div class="sliding_child">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed in risus accumsan, elementum ipsum id, molestie lorem. Suspendisse eu eros vitae ipsum consequat vehicula quis fermentum tortor.</p>
</div>
</div>
CSS
div.mother {
overflow: hidden;
width: 200px;
height: 300px;
}
div.sliding_child {
width: 200px;
height: 600px;
}
簡單這樣http://jsfiddle.net/BBHV7/ –