css3制作模块变大的效果


点击(此处)折叠或打开

  1. <!DOCTYPE HTML>
  2. <html lang=\"en-US\">
  3. <head>
  4. <meta charset=\"UTF-8\">
  5. <title>css3制作模块变大的效果丨</title>
  6. </head>
  7. <body>
  8.         <style type=\"text/css\">
  9.         *{margin:0;padding:0px;}
  10.     body{background:#b1b1b1;font-family:Arial;font-size:125%;color:#202020;}
  11.     li{position:relative;list-style:none;float:left;width:235px;height:220px;margin:10px 0 0 10px;cursorointer;}
  12.     .tips{width:800px;margin:0 auto;line-height:24px;padding-top:10px;font-size:14px;}
  13.         .bredcolor{color:#fff;}
  14.     .module_change{width:980px;margin:0 auto;}
  15.     .module_change section{position:absolute;background:#ccc;padding:10px;text-align:center;
  16.         -webkit-animation:module_change .4s ease-in;
  17.         -webkit-animation-fill-mode:forwards;
  18.     }
  19.     li section:hover{background:red;-webkit-transition:background .3s linear;}
  20.     @-webkit-keyframes module_change{
  21.         0%{width:0px;height:0px;left:50%;top:50%;line-height:0px;opacity:0;}
  22.         100%{width:215px;height:200px;left:0%;top:0%;line-height:200px;opacity:1;}
  23.     }
  24.         </style>
  25.         <section class=\"tips\">
  26.         本效果有多种方法实现:但是最简单的就是在外面套一层。原因:<br>
  27.         css3中大部分的效果是离不开position:absolute的。<br>
  28.         案例中的的效果需要变宽变高,并且是由中间扩散的。<br>
  29.         所以为了统一,我就在外面家了一个框,告诉他,这个是运动的标准。<br>
  30.         接下来就是运用什么属性了!变宽变位置肯定离不开keyframes,当然也可以运用transition。
  31.          
  32. <br><font color=black>▲ 目前IE8及以前版本不兼容CSS3,请使用IE9/火狐/Chrome浏览器运行本效果。<br><hr><p align=\"center\"></p></font>

  33.         </section>
  34.         <section class=\"module_change\">
  35.         <ul>
  36.             <li><section>1</section></li>
  37.             <li><section>2</section></li>
  38.             <li><section>3</section></li>
  39.             <li><section>4</section></li>
  40.             <li><section>5</section></li>
  41.             <li><section>6</section></li>
  42.             <li><section>7</section></li>
  43.             <li><section>8</section></li>
  44.         </ul>
  45.     </section>
  46. </body>
  47. </html>

点击(此处)折叠或打开

  1. <!DOCTYPE HTML>
  2. <html lang=\"en-US\">
  3. <head>
  4. <meta charset=\"UTF-8\">
  5. <title>css3制作模块变大的效果丨芯晴网页特效丨CsrCode.CN</title>
  6. </head>
  7. <body>
  8.         <style type=\"text/css\">
  9.         *{margin:0;padding:0px;}
  10.     body{background:#b1b1b1;font-family:Arial;font-size:125%;color:#202020;}
  11.     li{position:relative;list-style:none;float:left;width:235px;height:220px;margin:10px 0 0 10px;cursorointer;}
  12.     .tips{width:800px;margin:0 auto;line-height:24px;padding-top:10px;font-size:14px;}
  13.         .bredcolor{color:#fff;}
  14.     .module_change{width:980px;margin:0 auto;}
  15.     .module_change section{position:absolute;background:#ccc;padding:10px;text-align:center;
  16.         -webkit-animation:module_change .4s ease-in;
  17.         -webkit-animation-fill-mode:forwards;
  18.     }
  19.     li section:hover{background:red;-webkit-transition:background .3s linear;}
  20.     @-webkit-keyframes module_change{
  21.         0%{width:0px;height:0px;left:50%;top:50%;line-height:0px;opacity:0;}
  22.         100%{width:215px;height:200px;left:0%;top:0%;line-height:200px;opacity:1;}
  23.     }
  24.         </style>
  25.         <section class=\"tips\">
  26.         本效果有多种方法实现:但是最简单的就是在外面套一层。原因:<br>
  27.         css3中大部分的效果是离不开position:absolute的。<br>
  28.         案例中的的效果需要变宽变高,并且是由中间扩散的。<br>
  29.         所以为了统一,我就在外面家了一个框,告诉他,这个是运动的标准。<br>
  30.         接下来就是运用什么属性了!变宽变位置肯定离不开keyframes,当然也可以运用transition。
  31.           qq群:197326136
  32. <br><font color=black>▲ 目前IE8及以前版本不兼容CSS3,请使用IE9/火狐/Chrome浏览器运行本效果。<br><hr><p align=\"center\">本特效由 <a href=\"http://www.CsrCode.cn\" target=\"_blank\">芯晴网页特效</a>丨CsrCode.Cn 收集于互联网,只为兴趣与学习交流,不作商业用途。</p></font>

  33.         </section>
  34.         <section class=\"module_change\">
  35.         <ul>
  36.             <li><section>1</section></li>
  37.             <li><section>2</section></li>
  38.             <li><section>3</section></li>
  39.             <li><section>4</section></li>
  40.             <li><section>5</section></li>
  41.             <li><section>6</section></li>
  42.             <li><section>7</section></li>
  43.             <li><section>8</section></li>
  44.         </ul>
  45.     </section>
  46. </body>
  47. </html>


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29737856/viewspace-1218559/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29737856/viewspace-1218559/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值