如何使用CSS在Google Chrome中创建无边框文本框?

San*_* MS 6 html css google-chrome

如何创建无边界HTML文本框以在Google Chrome浏览器中使用?如果可能的话,我宁愿在CSS中这样做.

Sko*_*ioh 8

CSS 3可能会有所帮助:

input[type=text],
input[type=text]:hover,
input[type=text]:focus,
input[type=text]:active
{
    border: 0;
    outline: none;
    outline-offset: 0;
}
Run Code Online (Sandbox Code Playgroud)


And*_*ore 7

您可以使用以下方法从文本框中删除边框和焦点轮廓.

input[type=text], textarea {
  border: 0;
}

input[type=text]:focus, textarea:focus {
  outline: none;
}
Run Code Online (Sandbox Code Playgroud)