我真的想知道如何更改具有属性font-color
的特定<label>
的for="shipping_method_0_774"
,而它在无序列表和列表项中...
<ul id="shipping_method" class="woocommerce-shipping-methods">
<li>
<input type="hidden" name="shipping_method[0]" data-index="0" id="shipping_method_0_774" value="774" class="shipping_method">
<label for="shipping_method_0_774">Pakketpost Bezorging: GRATIS</label>
</li>
</ul>
真的希望你帮忙!
先感谢您
使用[]
设置您想要的属性
ul li label[for="shipping_method_0_774"]{
color:red;
}
<ul id="shipping_method" class="woocommerce-shipping-methods">
<li>
<input type="hidden" name="shipping_method[0]" data-index="0" id="shipping_method_0_774" value="774" class="shipping_method"><label for="shipping_method_0_774">Pakketpost Bezorging: GRATIS</label> </li>
</ul>
为了更具体的当前ul
(带id)使用:
#shipping_method li label[for="shipping_method_0_774"]{
color:red;
}
这是你想要的吗?
label[for="shipping_method_0_774"] {
color: red;
}
<label for="shipping_method_0_774">Correct label</label>
<br>
<label for="shipping_method_1337">Random label</label>