Html 如何使用CSS在Google Chrome中创建无边框文本框?
如何创建一个无边框的HTML文本框以在Google Chrome浏览器中工作?如果可能的话,我更愿意用CSS来做这件事 文本区?比如: HTML:Html 如何使用CSS在Google Chrome中创建无边框文本框?,html,css,google-chrome,Html,Css,Google Chrome,如何创建一个无边框的HTML文本框以在Google Chrome浏览器中工作?如果可能的话,我更愿意用CSS来做这件事 文本区?比如: HTML: CSS:textarea{border:none 0;}在CSS中,写入 input, textarea, input:focus, textarea:focus { background:transparent; border:0; } 确保焦点上不显示边框非常重要。您可以使用以下方法从文本框中删除边框和焦点轮廓 input[
CSS:textarea{border:none 0;}
在CSS中,写入
input, textarea, input:focus, textarea:focus {
background:transparent;
border:0;
}
确保焦点上不显示边框非常重要。您可以使用以下方法从文本框中删除边框和焦点轮廓
input[type=text], textarea {
border: 0;
}
input[type=text]:focus, textarea:focus {
outline: none;
}
CSS 3在这里可能会有所帮助:
@克里姆:将
input[type=text]
替换为textarea
@Andrew:'borderless'!='没有提纲,呵呵。这个问题是专门针对Chrome的。我很清楚,那个人已经尝试了border:0
,试图摆脱焦点轮廓。
input[type=text],
input[type=text]:hover,
input[type=text]:focus,
input[type=text]:active
{
border: 0;
outline: none;
outline-offset: 0;
}