实现菜单底部线条沿着 X 轴的值缩放转换scaleX
效果:
代码:
a{padding: 10px 10px; position: relative;} a:before{content: ''; width: 100%; height: 3px; background-color: #f00; transform: scaleX(0); -webkit-transform: scaleX(0); transition: all 0.2s; -webkit-transition: all 0.2s; position: absolute; bottom: 0px; left: 0px;} a:hover{color: #0000d0;} a:hover:before{transform: scaleX(1); -webkit-transform: scaleX(1);}
网站:http://shibowl.top
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日----
github:https://github.com/hanbinjxnc
博客园:https://www.cnblogs.com/hool
博客:https://blog.shibowl.top
淘宝店:https://boxunwl.taobao.com/
作者:世博 2019年4月28日----