我指的錨點在上面我了解如何創建帶有 border-raidus 的圓角,但不像上面的錨點。
如何創建具有圓角的錨點?
ibeautiful
2023-10-24 19:59:36
TA貢獻1858條經驗 獲得超8個贊
你必須使用border-radius. 但問題是不使用百分比,而是使用元素高度的一半,px或其他單位,如em或rem。
這是一些可以幫助您的示例代碼。
.anchor {
width: 120px;
height: 50px;
border-radius: 25px;
background: red;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
<div class="anchor">Contact</div>
舉報