给大家做一个小案例,如何css3怎么实现图片封面展示的动画。图片封面展示在很多情景下可以用到,比如产品展示页面等。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | <!DOCTYPE html>
<html >
<head>
<meta charset= "UTF-8" >
<title>css3图片封面展示动画</title>
<link rel= "stylesheet" href= "css/style.css" >
</head>
<body>
<div class = "cont s--inactive" >
<!-- cont inner start -->
<div>
<!-- el start -->
<div>
<div>
<div>
<div></div>
<div>
<h2>Section 1</h2>
</div>
<div>
<div>Whatever</div>
<div></div>
</div>
</div>
</div>
<div>
<div>1</div>
<div>
<div data-index= "1" >1</div>
</div>
</div>
</div>
<!-- el end -->
<!-- el start -->
<div>
<div>
<div>
<div></div>
<div>
<h2>Section 2</h2>
</div>
<div>
<div>Whatever</div>
<div></div>
</div>
</div>
</div>
<div>
<div>2</div>
<div>
<div data-index= "2" >2</div>
</div>
</div>
</div>
<!-- el end -->
<!-- el start -->
<div>
<div>
<div>
<div></div>
<div>
<h2>Section 3</h2>
</div>
<div>
<div>Whatever</div>
<div></div>
</div>
</div>
</div>
<div>
<div>3</div>
<div>
<div data-index= "3" >3</div>
</div>
</div>
</div>
<!-- el end -->
<!-- el start -->
<div>
<div>
<div>
<div></div>
<div>
<h2>Section 4</h2>
</div>
<div>
<div>Whatever</div>
<div></div>
</div>
</div>
</div>
<div>
<div>4</div>
<div>
<div data-index= "4" >4</div>
</div>
</div>
</div>
<!-- el end -->
<!-- el start -->
<div>
<div>
<div>
<div></div>
<div>
<h2>Section 5</h2>
</div>
<div>
<div>Whatever</div>
<div></div>
</div>
</div>
</div>
<div>
<div>5</div>
<div>
<div data-index= "5" >5</div>
</div>
</div>
</div>
<!-- el end -->
</div>
<!-- cont inner end -->
</div>
<script src= "js/index.js" ></script>
</body>
</html>
|
登录后复制
图片封面展示的动画的用法就是这么多了。更多精彩请关注php中文网其它相关文章!
相关阅读:
CSS3有哪些新增的背景属性
在HTML里web标准是什么
CSS3怎么做出响应式布局
以上是css3怎么实现图片封面展示的动画的详细内容。更多信息请关注PHP中文网其他相关文章!