你如何在Firefox中设置contentEditable? [英] How do you style contentEditable in Firefox?
本文介绍了你如何在Firefox中设置contentEditable?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< div contenteditable =true>第2项< / div>
在webkit中,我可以使用css轻松地设置它。 Firefox忽略了css,并使contenteditable div白色和可调整大小。
如何修改Firefox中contentEditable的css。我希望背景透明,并禁用调整大小,并调整大小的处理栏。
谢谢
解决方案
您可以使用此代码匹配div
div [contenteditable = true] {
background:rgba(0,0,0,0); / *透明bg * /
resize:none; / *禁用调整大小* /
}
I have the following:
<div contenteditable="true">Item 2</div>
In webkit I can easily style this with css. Firefox is ignoring the css, and making the contenteditable div white and resizable.
How can I modify the css for contentEditable in Firefox. I want the background to be transparent and to disable resizing, and the resizing handle bar.
Thanks
解决方案
You can match the div with this code
div[contenteditable=true] {
background: rgba(0,0,0,0); /* transparent bg */
resize:none; /* disable resizing */
}
这篇关于你如何在Firefox中设置contentEditable?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文