我已经试过这一点,但它不会在文字区域:(情况下工作(在Chrome和IE)关于如何更改textarea选择颜色的任何想法?
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
在那里有可能进制方式?
CSS或jQuery的任何如何?
我已经试过这一点,但它不会在文字区域:(情况下工作(在Chrome和IE)关于如何更改textarea选择颜色的任何想法?
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
在那里有可能进制方式?
CSS或jQuery的任何如何?
你试图改变它里面的文字textarea
或只是颜色的背景颜色如果是后者,那么这就是你想要什么?
::-moz-selection {
color: #b3d4fc;
text-shadow: none;
}
::selection {
color: #b3d4fc;
text-shadow: none;
}
正如在这里看到:http://jsfiddle.net/u6CNN/
顺便说一下,您也可以指定background-color
。
我想你正在试图在Firefox上变瘦。所以请检查Chrome或IE – john 2013-02-09 11:46:49
这仅在Firefox(和Safari?)中受支持。
您可以做一个解决方法。而不是textarea
使用div
with contenteditable。
如果我理解正确的话,你想改变一个textarea的背景色,对不对?
是这样的:
textarea{
/* Change the color of the typed text in the textarea */
color: #CCC;
/* Change the background color of the actual textarea */
background-color: #000;
}
或类:
CSS->
.classname{
/* Change the color of the typed text in the textarea */
color: #CCC;
/* Change the background color of the actual textarea */
background-color: #000;
}
HTML的“
<textarea class="classname">
</textarea>
其他,你已经已经什么试过,没有办法修改浏览器选择公司阴沉。 – 2013-02-09 11:37:40
嗯我认为相同,但让我们看看是否有人有想法.. – john 2013-02-09 11:39:24