我非常喜歡該網站上的自動縮放放大和縮小效果:http://watchingtheworldcup.com/適用於橫幅圖像,如最上面的一個。 我累複製它,通過查看開發工具wihtin瀏覽器,但有其實現爲在developper工具有些提到的撫摸了一些麻煩等自動放大n出CSS(類似蘋果的幻燈片效果)
這裏是我的html:
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<a href="#">
<article class="article_container">
<img class="article_image_hompage5" src="#">
<h2 class="article_title_hompage3"> a favourite thai soup</h2>
</article>
</a>
</div>
</div>
和我的CSS爲圖像:
.article_image_hompage5{
width: 100%;
border-radius: 2px 2px 2px 2px;
position:relative;
display:block;
margin-left:auto;
margin-right:auto;
margin-top:15px;
z-index:0;
}
有人可以幫助找到正確的CSS設置? 歡呼聲,
可以請你彰顯我怎麼嵌入那些在我css? – lauWM 2014-09-22 07:25:45
http://www.w3schools.com/css/css3_animations.asp你的情況,改變img {... to .article_image_hompage5 { – 2014-09-22 07:28:25
thx max li,運作良好。對於將來(初學者)的訪問者來說,只需要一個精確度,圖片需要在div容器內框起來,以避免溢出 – lauWM 2014-09-22 09:02:48