1
在codepen from CSS-Tricks上找到的包含例子中,哪个 属性在css代码中决定div的形状?CSS/HTML动画圈到方形。哪个属性/属性决定了形状?
我了解这里的大部分CSS属性。我只是想知道 决定了形状,以及是否有办法描述/或制作其他形状。例如一颗星星或三角形。
我是新来的css,想学习语言,尤其是 动画技巧。
.element {
height: 250px;
width: 250px;
margin: 0 auto;
background-color: red;
animation-name: stretch;
animation-duration: 1.5s;
animation-timing-function: ease-out;
animation-delay: 0;
animation-direction: alternate;
animation-iteration-count: infinite;
animation-fill-mode: none;
animation-play-state: running;
}
@keyframes stretch {
0% {
transform: scale(.3);
background-color: red;
border-radius: 100%;
}
50% {
background-color: orange;
}
100% {
transform: scale(1.5);
background-color: yellow;
}
}
body,
html {
height: 100%;
}
body {
display: flex;
align-items: center;
justify-content: center;
}
<div class="element"></div>
这很有道理。谢谢! – akasoggybunz
@akasoggybunz这里是演示,看看:https://codepen.io/hirenalken/pen/jzEprN –