CSS“inner-html”技术? [英] CSS "inner-html" technique?
问题描述
我想知道是否有一种方法根据它包含的单词查询元素。所以,如果我有:
< div id =globalPageHeader>
< h1>主页< / h1>
< / div>
我想要任何 显然这个例子不起作用,但我想知道是否有这样的事情: 我不想使用JavaScript的 任何帮助都非常感谢! 使用纯CSS,这是不可能的。 I was wondering if there was a way to query elements according to the word it contains. So, if I have: I want any Obviously this example wouldn't work, but I was wondering if there's something like it: I don't want to use JavaScript's Any help is much appreciated! With pure CSS, that’s impossible. 这篇关于CSS“inner-html”技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! #globalPageHeader h1
使用 Home
这个词来表示显示属性
none $ c $
#globalPageHeader h1(innerHTML ==Home){
display:none;
}
innerHTML
因为我无法访问管理员的javascript部分。
<div id="globalPageHeader">
<h1>Home</h1>
</div>
#globalPageHeader h1
that has the word Home
in it, to have a display
property of none
.#globalPageHeader h1(innerHTML == "Home") {
display: none;
}
innerHTML
because I have no access to the javascript parts of the admin.