CSS3 transform difference in Firefox and Chrome and IE

纵饮孤独 提交于 2019-11-29 17:34:13

I am not sure about why Chrome has problems with your code, but you can simplify it and then it will work ok in all the browsers.

You should change your CSS to

.footer-social-links a:hover::before,
.footer-social-links a:focus::before {
    width: 80%; 
    left: 10%;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    transform: rotate(0deg);
}

.footer-social-links a:hover::after,
.footer-social-links a:focus::after {
    width: 80%;
    right: 10%;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    transform: rotate(0deg);
}

It is useless to do a translate in X and at the same time modify your left value; better concentrate the changes in a single value (left) and eliminate the translateX

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!