如何删除输入的边框[关闭]

问题描述 投票:-5回答:3
enter image description here

我一直在尝试创建一个非常简单的登录页面。如您所见,这些输入周围有黑色边框。我的问题是,如何删除边框?

html css
3个回答
1
投票
不是边框,而是chrome的可访问性边框。您可以尝试禁用此标志:chrome://flags/#form-controls-refresh大约83+版本的chrome更改了表单的呈现/处理方式。

0
投票
尝试使用以下样式:

button {    border: none; } button:checked {    border: none; }

否则,问题可能出在您使用的浏览器的功能上。

我希望能提供帮助,并尽可能添加所使用的代码段。


0
投票
这是Google Chrome的新更新。前几天我遇到了。只需将outline: none;添加到元素:

#testInput { outline: none; border-radius: 10px; border: 1px solid red; height: 25px; width: 225px; padding: 5px 10px; }
<input id="testInput" type="text" placeholder="If you click here, no border is shown!" />
您也可以尝试禁用此标志:chrome://flags/#form-controls-refresh。这样会将轮廓的颜色更改为浅蓝色,这是Google更改选项之前的默认设置。但是,如果您尝试建立一个面向公众的网站,则第一种选择会更好,因为并非所有人都禁用了该标志。希望这会有所帮助!
© www.soinside.com 2019 - 2024. All rights reserved.