這裏是你想要的東西:
CSS:
/* Galerie */
.galerie { float:right; height:440px; width:160px; padding:10px;
background-color:grey; }
/* Content boxes here */
.cont { float:right; height:130px; width:150px; padding:4px; margin-top:4px;
background-color:grey; border:1px solid #000; border-radius:16px 16px 16px 16px; }
/* Dont display the text until hover */
.txt { float:left; width:53%; display:none; }
/* There is 4px padding between img and content div so for a fitting look
radius of image should be 16 - 4 = 12px */
.pic { float:right; display:block; }
.pic img { height:130px; width:150px; border-radius:12px 12px 12px 12px; }
/* On Hover */
.cont:hover { width:320px; background-color:white; }
.cont:hover .txt { display:block; }
HTML:
<div class="galerie">
<div class="cont">
<div class="pic"><img src="http://image.shutterstock.com/display_pic_with_logo/140095/140095,1310613638,1/stock-photo-team-work-ants-constructing-bridge-80955316.jpg"></div>
<div class="txt">
This is the text of content
and some more text to see
and a little more text..
</div>
</div>
<div class="cont">
<div class="pic"><img src="http://image.shutterstock.com/display_pic_with_logo/51333/51333,1199715661,1/stock-photo-young-puppy-listening-to-music-on-headphones-8323504.jpg"></div>
<div class="txt">
This is the text of content
and some more text to see
and a little more text..
</div>
</div>
<div class="cont">
<div class="pic"><img src="http://image.shutterstock.com/display_pic_with_logo/57421/57421,1154123042,1/stock-photo-four-penguins-in-antarctica-1607229.jpg"></div>
<div class="txt">
This is the text of content
and some more text to see
and a little more text..
</div>
</div>
</div>
小提琴:
http://jsfiddle.net/BerkerYuceer/qQ8Gd/
,你可以把這些內容的div進入鏈接,如果你想要的。
嗨Berker。這是我一直在尋找的解決方案。謝謝你的幫助! –
沒問題..我總是很喜歡純粹的css用戶。 –