[英]How can i take an SVG image of a circle and put it at the bottom of the webpage, in a way that you can only see the top half all the time
這可以很容易地通過創建一個絕對定位的溢出隱藏包裝器,並將旋轉 animation 添加到包裝器內的元素來完成。
.spinner { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); overflow: hidden; height: calc(50vw / 2); }.spinner img { animation: spin 5s linear infinite; width: 50vw; border-radius: 100%; } @keyframes spin { from {transform:rotate(0deg);} to {transform:rotate(360deg);} }
<div class="spinner"> <img src="https://picsum.photos/200"> </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.