左半圆边框
答
边框半径可以使用::after
CSS伪元素这一点。以下是示例fiddle。希望这可以帮助你。
.link {
height: 100px;
width: 100px;
background: red;
position: relative;
overflow: hidden;
}
.link::after{
content: "";
height: 80%;
background: #fff;
width: 20px;
position: absolute;
top: 10%;
left: -10px;
border-radius: 20px;
transition: all .35s;
opacity: 0;
}
.link:hover::after{opacity:1}
<div class="link"></div>
检查这个link。您可以从此处更多地了解CSS伪元素。
答
尝试使用这样
div {
width: 10px;
height:40px;
background-color: black;
border-top-right-radius: 6px;
border-bottom-right-radius:6px;
}
<div></div>
+0
您认为可以在左侧留下切割部分吗?也许玩的位置? – davidbonachera
+0
只是将'border-top-right-radius'替换为'border-left-left-radius'和'border-bottom-right-radius'为'border-bottom-left-radius' – GvM
哦,这很完美,我需要学习如何在/之前使用元素,以便我不需要在我的整个列表中添加一个元素。完善。 – davidbonachera
高兴地帮助你。 – Sasith