html5标签"Contenteditable"的CSS选择器; [英] css selector for html5 tag "Contenteditable"
本文介绍了html5标签"Contenteditable"的CSS选择器;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将CSS选择器用于contenteditable ="true"
How can I use css selector for contenteditable="true"
<div id="1" name="1" contentEditable="true"></div>
推荐答案
使用 CSS属性选择器:
div[contenteditable="true"] {
background: red;
}
在英语中,这意味着:查找具有contenteditable属性且其值设置为true的所有div." 在上面的示例中,我们找到了所有contenteditables的div元素并赋予它们红色背景.
In English, this means: "Find all divs which have an attribute of contenteditable with its value set to true." In the above example, we find all div elements that are contenteditables and give them a red background.
这篇关于html5标签"Contenteditable"的CSS选择器;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文