这是创建按钮的html
代码
<div class="delete-style">
<button type="button">DELETE</button>
</div>
我正在使用这个 css
代码来移除 button
中文本周围的边框
.delete-style {
background-color: red;
padding: 10px 20px;
text-decoration: none;
display: inline-block;
outline: None;
overflow: hidden;
}
最佳答案
要删除按钮周围的边框,您可以将 border : None;
样式添加到您的按钮
.delete-style {
background-color: red;
padding: 10px 20px;
text-decoration: none;
display: inline-block;
outline: None;
overflow: hidden;
}
.delete-style button {
border: None;
}
<div class="delete-style">
<button type="button">DELETE</button>
</div>
关于html - 使用 css 去除背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50493660/