css3全屏背景圖片切換特效


效果體驗:http://hovertree.com/texiao/css3/10/

一般做圖片切換效果,都會使用JS或者jQuery腳本,今天發現,其實只用CSS也可以實現。試試效果吧。


效果圖:


代碼如下:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>純CSS3實現全屏背景切換焦點圖效果 - 何問起</title>
<link rel="stylesheet" type="text/css" href="http://hovertree.com/texiao/css3/10/css/style.css" media="all" />
</head>
<body>
<div class="slider">
<ul class="clearfix">
<li><a href="http://hovertree.com/texiao/css3/10/#bg1">圖片切換1</a></li>
<li><a href="http://hovertree.com/texiao/css3/10/#bg2">圖片切換2</a></li>
<li><a href="http://hovertree.com/texiao/css3/10/#bg3">圖片切換3</a></li>
<li><a href="http://hovertree.com/texiao/css3/10/#bg4">圖片切換4</a></li>
<li><a href="http://hovertree.com/texiao/css3/10/#bg5">圖片切換5</a></li>
</ul>
</div>
<div class="hovertreecontent">
<h1>何問起 純CSS3實現全屏背景切換焦點圖效果</h1>
<a href="http://hovertree.com/h/bjaf/8c5uhche.htm" target="_blank">原文</a> <a href="http://hovertree.com/" target="_blank">首頁</a> <a href="http://hovertree.com/texiao/" target="_blank">特效</a>
</div>
<img src="http://hovertree.com/texiao/css3/10/images/bg1.jpg" alt="美圖" class="bg slideLeft" id="bg1" /> 
<img src="http://hovertree.com/texiao/css3/10/images/bg2.jpg" alt="美圖" class="bg slideBottom" id="bg2" /> 
<img src="http://hovertree.com/texiao/css3/10/images/bg3.jpg" alt="美圖" class="bg zoomIn" id="bg3" /> 
<img src="http://hovertree.com/texiao/css3/10/images/bg4.jpg" alt="美圖" class="bg zoomOut" id="bg4" /> 
<img src="http://hovertree.com/texiao/css3/10/images/bg5.jpg" alt="美圖" class="bg rotate" id="bg5" />

</body>
</html>

轉自:http://hovertree.com/h/bjaf/8c5uhche.htm

更多特效:http://www.cnblogs.com/roucheng/p/texiao.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM