css3元素的伸缩效果代码实例
分类:实例代码
本章节分享一段代码实例,它利用css3实现了元素的伸缩效果。
代码实例如下:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://www.pipipi.net/" /> <title>前端教程网</title> <style> .demo_box{ border:1px solid #3DA5DC; background:#a4dcf9; height:100px; width:200px; text-align:center; color:#fff; margin:50px 100px; } .scale_2{ -webkit-transition:1s ease all; -moz-transition:1s ease all; background:#4d6ea6; } .scale_2:hover{ -webkit-transform:scale(0.5); -moz-transform:scale(0.5); } </style> </head> <body> <div class="demo_box scale_2">前端教程网</div> </body> </html>
css3元素的伸缩效果代码实例,这样的场景在实际项目中还是用的比较多的,关于css3元素的伸缩效果代码实例就介绍到这了。
css3元素的伸缩效果代码实例属于前端实例代码,有关更多实例代码大家可以查看。