html - 如何从输入中删除黑色顶部和左侧轮廓

标签 html css

.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/

相关文章:

html - float : right item? 上不存在的右边距

javascript - Paper js 'dot' 路径在 Firefox 中显示,但在 IE 或 Chrome 中不显示

html - 严格的 2 列布局与元素跨越多列的 12 列相比有哪些优势?

javascript - 以正确的方式使用 z-index

javascript - 大纲:none in css?的反义词是什么

jquery - 用 jQuery 动画我的右侧边栏以隐藏它

html - 如何实现悬停滚动内容的定宽div?

javascript - 仅在全屏模式下显示页面滚动

javascript - AngularJS - 为什么 ng-mouseleave 不能正常工作?

jquery - foundation-5 气氛包导航栏展开折叠不起作用