我想將兩個DIV放在彼此的上方,這樣當指針懸停在圖片上方時,頂部的一個會淡出以顯示下方的DIV。我在這裏做了這個:http://quaystreet.chrisloughnane.net/如何確定兩個中心DIV彼此重疊並做出反應?
我想讓它響應,以便圖片可以縮放到移動設備的水平寬度。一張照片沒有問題,但只要我嘗試重新定位下面的DIV就會中斷。
http://jsfiddle.net/chrisloughnane/f2NdQ/4/
是否有可能只用CSS做我想要什麼?
<div id='old'><img src="http://quaystreet.chrisloughnane.net/images/quay-street-old.jpg"/></div>
<div id='new'><img src="http://quaystreet.chrisloughnane.net/images/quay-street-new.jpg"/></div>
img {
max-width: 100%;
display: block;
margin: auto;
}
嘿老兄你的鏈接是等於我 –
@ViníciusMoraes權,只是做了惹我的標籤:) – fcalderan
我想它仍然是錯誤的兄弟 –