.modal{
width:50%;
margin:0 auto;
padding:9px;
background:lightseagreen;
}
input{
display:block;
outline:none;
border-radius:9px;
}
<div class='modal'>
<input type='text'>
</div>
有没有办法去除 input
标签顶部和左侧的黑色轮廓。
我可以通过添加边框来做到这一点:
border:1px solid lightseagreen;
但我不希望在输入周围有任何边框或轮廓,通常在整个站点上,因为 .modal
的背景颜色是可变的。
最佳答案
在输入 CSS 中使用 border: none
.modal{
width:50%;
margin:0 auto;
padding:9px;
background:lightseagreen;
}
input{
display:block;
outline:none;
border-radius:9px;
border: none;
}
<div class='modal'>
<input type='text'>
</div>
关于html - 如何从输入中删除黑色顶部和左侧轮廓,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50146328/