gpt4 book ai didi

css - 使用 :after and :hover:after button in IE11

转载 作者:行者123 更新时间:2023-11-28 09:46:05 25 4
gpt4 key购买 nike

我有一个使用 :after 和 :hover:after CSS 动画的按钮。尝试了多种方法让它在 IE 中工作但找不到解决方法。可能是因为内容为空:“”,或者过渡,但即使没有过渡也是行不通的。非常感谢任何帮助/解释。

button.bttnStyle1 {
background: none;
border: none;
font-size: 14rem;
text-transform: uppercase;
position: relative;
padding: 0rem;
cursor: pointer;
}

button.bttnStyle1:after,
button.bttnStyle1::after {
display: block;
position: absolute;
left: 0;
bottom: -5rem;
width: 3rem;
height: 3rem;
border-radius: 3rem;
content: "";
-o-transition: width 0.4s ease, height 2s ease-out;
-moz-transition: width 0.4s ease, height 2s ease-out;
-webkit-transition: width 0.4s ease, height 2s ease-out;
transition: width 0.4s ease, height 2s ease-out;
}

button.bttnStyle1:hover {}

button.bttnStyle1:hover:after,
button.bttnStyle1:hover::after {
width: 100%;
height: 2rem;
-o-transition: width 0.4s ease, height 2s ease-out;
-moz-transition: width 0.4s ease, height 2s ease-out;
-webkit-transition: width 0.4s ease, height 2s ease-out;
transition: width 0.4s ease, height 0.2s ease;
}

button.bttnStyle1:focus {
outline: none;
}

button.bttnColorGreen {
color: #69e0b1;
}

button.bttnColorGreen:after{
background-color:#69e0b1;
}
<button type="button" class="bttnStyle1 bttnColorGreen">BUTTON</button>

Codepen

最佳答案

overflow: visible; 添加到您的按钮。找到这个解决方案 here .

关于css - 使用 :after and :hover:after button in IE11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32894844/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com