-1
所以我在Carrd.co上看到了這個瘋狂的好效果,我不明白這是如何進行動畫製作的。SVG背景+ CSS - 這怎麼能這樣動畫?
.pizza {
display: -moz-flex;
display: -webkit-flex;
display: -ms-flex;
display: flex;
-moz-flex-direction: column;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-moz-align-items: center;
-webkit-align-items: center;
-ms-align-items: center;
align-items: center;
-moz-justify-content: space-between;
-webkit-justify-content: space-between;
-ms-justify-content: space-between;
justify-content: space-between;
min-height: 100vh;
padding: 2em 0;
text-align: center;
background-image: url("https://carrd.co/assets/images/bg.svg"),linear-gradient(45deg, #6E436C 25%, #2A4584 75%);
background-size: cover, cover;
background-position: top, center;
background-repeat: no-repeat, no-repeat;
cursor: default;
}
<div class="pizza">
</div>
如果有人可以解釋這對我來說將是很好。什麼讓svg動畫?
在我看來,最好的學習方法是打開web開發工具,開始打開和關閉屬性,看看會發生什麼。嘗試改變一些值等等。至少我發現這是幫助我理解css屬性的最好方法。 – Bojan