github

实现菜单底部线条沿着 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);}

 

posted @ 2019-09-19 15:28  博讯科技工作室  阅读(274)  评论(0编辑  收藏  举报

赣州博讯科技工作室

©2019

回到顶部
回到底部
公众号 视博web工作室