[英]Resizing the bounding box of when a line is rotated
請檢查基於CSS的解決方案來解決您的問題。 您可以將overflow:hidden設置為隱藏溢出線
.boundary { width: 100px; height: 100px; border: 1px solid; overflow: hidden; //Key to hide the line which overflows the container } .boundary:hover .line { transform: rotate(360deg); } .line { width: 1px; height: 200%; background-color: blue; transform-origin: top; transform: rotate(315deg); transition: transform 1.2s; cursor: pointer; }
<div class="boundary"> <div class="line"></div> </div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.