我正在尝试添加一个简单的动画,该动画的雪花在容器中从上到下掉落: 这里链接:

问题描述 投票:0回答:1
我相信我的风格的高度100%意味着其自身身高的100%,但是我似乎无法为整个父母处理它。

我不来这里什么?

您需要重新排列包含SVG的Divs(.sc-dVBluf .fgjuVP

),以使季节''在它们之前,然后根据需要调整CSS,例如:

button
css reactjs css-animations styled-components
1个回答
0
投票
.DLsnt { border: 1px solid black; border-radius: 10px; padding: 5px; display: flex; justify-content: center; align-items: center; max-width: 33%; position: relative; min-width: 30%; height: 20%; } .cTlyjm { display: flex; justify-content: space-between; height: 100vh; } .fgjuVP { height: 100%; width: 24px; /*change here*/ position: relative; /*change here, too*/ animation: snowFlake 2s ease-in-out infinite; left: calc(-16.5%); /*the half of the max-width of the .DLsnt button*/ } @keyframes snowFlake { 0% { transform: translate(0%); } 50% { transform: translate(0, 50%); } 100% { transform: translate(0, 100%); } }



    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.