如果可能的话,我想从文本区域中删除样式并使其全白,没有任何边框或发光。我尝试过在 SO 上找到的不同内容,但没有任何效果(尝试使用 FF 和 Chrome)。
那么,这可能吗?如果可以,应该怎么做?
到目前为止我尝试了什么:
textarea#story {
// other stuff
-moz-appearance:none;
outline:0px none transparent;
}
textarea:focus, input:focus{
outline: 0;
}
*:focus {
outline: 0;
}
最佳答案
发光效果很可能是由 box-shadow 控制的。除了添加 Pavel 所说的之外,您还可以为不同的浏览器引擎添加 box-shadow 属性。
textarea {
border: none;
overflow: auto;
outline: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
resize: none; /*remove the resize handle on the bottom right*/
}
您也可以尝试添加 !important 来确定此 CSS 的优先级。
关于css - 从 textarea 中删除所有样式(边框、发光),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17109702/