本文介绍了方括号中的CSS选择器在HTML中会选择什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我在库中看到了这个CSS规则集:
So I have seen this CSS rule-set in a library:
[text-uppercase] {
text-transform: uppercase;
}
我不确定如何在div
<div class="text-uppercase | [text-uppercase]"></div>
我都尝试过,但都没有用.我在ionic2中看到了这一点.
I have tried both, but neither are working. I am seeing this in ionic2.
推荐答案
要使选择器起作用:<div text-uppercase></div>
For the selector to work:<div text-uppercase></div>
[text-uppercase]
选择器与标签上的属性匹配.
[text-uppercase]
selector matches an attribute on a tag.
这篇关于方括号中的CSS选择器在HTML中会选择什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!