为什么css选择器
select, textarea, input[type="text"], input[type="password"],input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input
优先于
input.text-style
对于以下 html:
<input type="text" required="required" name="poemDataCollector[name]" id="poemDataCollector_name" class="text-style">
我读到类应该优先于 html 标签...
最佳答案
属性选择器同样特定于类选择器。
如果你想覆盖你可以这样写的类:
input.text-style[type="text"]
查看此决定了解更多 What is the specificity of the attribute selector?
关于CSS 选择器优先级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11427101/