我在这个元素中添加了这种样式:
.checkout-step.current .number {
background-color: #d26d51;
outline: 1px solid #d26d51;
outline-offset: 4px;
}
但我不想要轮廓中的方 Angular ,我想要圆 Angular ,就像这个例子:
我该怎么做?
最佳答案
我的做法如下。请查看JSFiddle . 我添加了以下 HTML。
<a href="#">2</a>
我添加了以下 CSS。
a {
background: #999;
width: 40px;
height: 40px;
border-radius: 20px;
text-decoration: none;
color: #fff;
display: inline-block;
line-height: 40px;
position: relative;
border: 2px solid #000;
text-align: center;
}
a:after {
content: '';
display: block;
position: absolute;
top: -10px;
bottom: -10px;
left: -10px;
right: -10px;
border-radius: 30px;
border: 2px solid #f00;
}
关于html - 轮廓属性 CSS 的圆 Angular ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31134743/