基本上,我可以访问我需要设置样式的第三方表单的css,并且该元素没有ID,所以我不确定如何使用css来设置样式,因为我不能在这里使用它的类是表单代码:可能重复:
is it possible to select element with specific content or attribute in CSS?
<label class="form_label" for="example" style="">email</label>
如何设置样式,所以它只适用于那些for属性等于示例的那些?
非常感谢。
答案 0 :(得分:10)
您可以选择这样的每个标签,并根据需要设置样式:
label[for="example"] {
color: #5c5c5c;
}