html:css3新特性:转换(二维,三维),过渡,动画,弹性布局
转换 2D转换 二维平面移动 语法: transform:translateX(移动的距离) translateY(移动的距离); Transform:translate(水平移动距离,垂直移动距离)
顺晟科技
2021-09-19 13:13:56
114
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> div{ width: 300px; height: 300px; border: #000 solid 1px; margin: 50px auto; overflow: hidden; } div img{ cursor: pointer; transition: all 0.6s; } div img:hover{ transform: scale(1.4); } </style> </head> <body> <div> <img src="img/focus.png" /> </div> </body> </html>
其中:
transition: all 0.6s;表示所有的属性变化在0.6s的时间段内完成。
transform: scale(1.4);表示在鼠标放到图片上的时候图片按比例放大1.4倍。
代码下载地址:http://download.csdn.net/detail/u014175572/9535023
13
2022-09
13
2022-09
13
2022-09
13
2022-09
13
2022-09
23
2021-10