-
<!DOCTYPE HTML>
-
<html lang=\"en-US\">
-
<head>
-
<meta charset=\"UTF-8\">
-
<title>css3制作模块变大的效果丨</title>
-
</head>
-
<body>
-
<style type=\"text/css\">
-
*{margin:0;padding:0px;}
-
body{background:#b1b1b1;font-family:Arial;font-size:125%;color:#202020;}
-
li{position:relative;list-style:none;float:left;width:235px;height:220px;margin:10px 0 0 10px;cursorointer;}
-
.tips{width:800px;margin:0 auto;line-height:24px;padding-top:10px;font-size:14px;}
-
.bredcolor{color:#fff;}
-
.module_change{width:980px;margin:0 auto;}
-
.module_change section{position:absolute;background:#ccc;padding:10px;text-align:center;
-
-webkit-animation:module_change .4s ease-in;
-
-webkit-animation-fill-mode:forwards;
-
}
-
li section:hover{background:red;-webkit-transition:background .3s linear;}
-
@-webkit-keyframes module_change{
-
0%{width:0px;height:0px;left:50%;top:50%;line-height:0px;opacity:0;}
-
100%{width:215px;height:200px;left:0%;top:0%;line-height:200px;opacity:1;}
-
}
-
</style>
-
<section class=\"tips\">
-
本效果有多种方法实现:但是最简单的就是在外面套一层。原因:<br>
-
css3中大部分的效果是离不开position:absolute的。<br>
-
案例中的的效果需要变宽变高,并且是由中间扩散的。<br>
-
所以为了统一,我就在外面家了一个框,告诉他,这个是运动的标准。<br>
-
接下来就是运用什么属性了!变宽变位置肯定离不开keyframes,当然也可以运用transition。
-
-
<br><font color=black>▲ 目前IE8及以前版本不兼容CSS3,请使用IE9/火狐/Chrome浏览器运行本效果。<br><hr><p align=\"center\"></p></font>
-
-
</section>
-
<section class=\"module_change\">
-
<ul>
-
<li><section>1</section></li>
-
<li><section>2</section></li>
-
<li><section>3</section></li>
-
<li><section>4</section></li>
-
<li><section>5</section></li>
-
<li><section>6</section></li>
-
<li><section>7</section></li>
-
<li><section>8</section></li>
-
</ul>
-
</section>
-
</body>
-
</html>
-
<!DOCTYPE HTML>
-
<html lang=\"en-US\">
-
<head>
-
<meta charset=\"UTF-8\">
-
<title>css3制作模块变大的效果丨芯晴网页特效丨CsrCode.CN</title>
-
</head>
-
<body>
-
<style type=\"text/css\">
-
*{margin:0;padding:0px;}
-
body{background:#b1b1b1;font-family:Arial;font-size:125%;color:#202020;}
-
li{position:relative;list-style:none;float:left;width:235px;height:220px;margin:10px 0 0 10px;cursorointer;}
-
.tips{width:800px;margin:0 auto;line-height:24px;padding-top:10px;font-size:14px;}
-
.bredcolor{color:#fff;}
-
.module_change{width:980px;margin:0 auto;}
-
.module_change section{position:absolute;background:#ccc;padding:10px;text-align:center;
-
-webkit-animation:module_change .4s ease-in;
-
-webkit-animation-fill-mode:forwards;
-
}
-
li section:hover{background:red;-webkit-transition:background .3s linear;}
-
@-webkit-keyframes module_change{
-
0%{width:0px;height:0px;left:50%;top:50%;line-height:0px;opacity:0;}
-
100%{width:215px;height:200px;left:0%;top:0%;line-height:200px;opacity:1;}
-
}
-
</style>
-
<section class=\"tips\">
-
本效果有多种方法实现:但是最简单的就是在外面套一层。原因:<br>
-
css3中大部分的效果是离不开position:absolute的。<br>
-
案例中的的效果需要变宽变高,并且是由中间扩散的。<br>
-
所以为了统一,我就在外面家了一个框,告诉他,这个是运动的标准。<br>
-
接下来就是运用什么属性了!变宽变位置肯定离不开keyframes,当然也可以运用transition。
-
qq群:197326136
-
<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>
-
-
</section>
-
<section class=\"module_change\">
-
<ul>
-
<li><section>1</section></li>
-
<li><section>2</section></li>
-
<li><section>3</section></li>
-
<li><section>4</section></li>
-
<li><section>5</section></li>
-
<li><section>6</section></li>
-
<li><section>7</section></li>
-
<li><section>8</section></li>
-
</ul>
-
</section>
-
</body>
-
</html>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29737856/viewspace-1218559/
,如需转载,请注明出处,否则将追究法律责任。