扫码关注官方订阅号
transition: transform .2s; 这样设置会对rotate scale translate进行过渡,我想只针对scale过渡呢该如何设置呢?
认证0级讲师
貌似没有单独设置这个scale的属性了,到群里问了个折中的方案,就是在对元素进行缩放的时候,才给元素一个transition: transform; 其他时候给他一个transtion: none;
题主可以试试这个....
p:hover { transform: scale(1.5,1.5); } p { width: 100px; height: 200px; background-color: #cccccc; margin: 200px auto; transition: all 1s; }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
题主可以试试这个....