如何使用CSS去除默认按钮边框

3

我有一个像这样的圆形按钮。

.rock{
height:100px;
width:100px;
border-radius:100px;
border-color:yellow;
border-width:8px;
}
<button class="rock" type='button'>Button</button>

My question is, how can I remove the weird half-colored thing that shows up on the button border and changes when clicked. I just want the button border to be solid yellow.

1个回答

6

border-style属性设为solid。我认为它默认是outset,这会给你一种更斜角的处理方式。

.rock {
  height: 100px;
  width: 100px;
  border-radius: 100px;
  border-color: yellow;
  border-width: 8px;
  border-style: solid;
}
<button class="rock" type='button'>Button</button>


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接