CSS3新增文字屬性實現圖片點擊轉場效果

來源:互聯網
上載者:User

標籤:

<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="Keywords" content="關鍵詞"><meta name="Description" content="描述"><title>CSS3新增文字屬性</title><style>body{background:#ccc;}#wrap{width:640px;margin:100px auto;box-shadow:0 10px 5px rgba(0,0,0,.7);position:relative;padding-top:320px;}#wrap>img{position:absolute;left:0px;top:0px;transition:all 1s;}img{display:block;}input{display:none;}label{border:10px solid #aaa;margin:20px 3px;float:left;opacity:.5;transition:all 1s;}input:checked + label{border:10px solid #fff;opacity:1;}input ~ img{opacity:0;transform:scale(1.1);}input:checked + label + img{opacity:1;transform:scale(1);}</style></head><body><div id="wrap"><input type="radio" name="checked" id="id1" checked ><label for="id1"><img src="images/1.jpg" width="100"></label><img src="images/1.jpg" width="640" height="320"><input type="radio" name="checked" id="id2"><label for="id2"><img src="images/2.jpg" width="100"></label><img src="images/2.jpg" width="640" height="320"><input type="radio" name="checked" id="id3" ><label for="id3"><img src="images/3.jpg" width="100"></label><img src="images/3.jpg" width="640" height="320"><input type="radio" name="checked" id="id4" ><label for="id4"><img src="images/4.jpg" width="100"></label><img src="images/4.jpg" width="640" height="320"><input type="radio" name="checked" id="id5" ><label for="id5"><img src="images/5.jpg" width="100"></label><img src="images/5.jpg" width="640" height="320"></div></body></html>

 

  

CSS3新增文字屬性實現圖片點擊轉場效果

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.