gpt4 book ai didi

css - 使用 scss 将伪元素悬停在父类上

转载 作者:太空宇宙 更新时间:2023-11-03 22:38:29 31 4
gpt4 key购买 nike

如何将以下 CSS 转换为 SCSS?

.parent-class:hover .child-class {
visibility: visible;
animation-name: bounceIn;
animation-duration: 450ms;
animation-timing-function: linear;
animation-fill-mode: forwards;
transition-delay:0s;
}

下面的代码似乎不起作用:

.parent-class{
&:hover .childclass{
visibility: visible;
animation-name: bounceIn;
animation-duration: 450ms;
animation-timing-function: linear;
animation-fill-mode: forwards;
transition-delay:0s;
}
}

最佳答案

你的 scss 有正确的想法——除了你的类名有错别字:

.childclass -> .child-class

.parent-class{
&:hover .child-class{
visibility: visible;
animation-name: bounceIn;
animation-duration: 450ms;
animation-timing-function: linear;
animation-fill-mode: forwards;
transition-delay:0s;
}
}

关于css - 使用 scss 将伪元素悬停在父类上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45143168/

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