我有个密码
<ul id="payment-methods">
<li>
<input class="payment-method" id="gateway_4063663" name="gateway" type="radio" value="4063663">
<label for="gateway_4063663">PagSeguro</label>
</li>
<li>
<input class="payment-method" id="gateway_4068219" name="gateway" type="radio" value="4068219">
<label for="gateway_4068219">Cash on Delivery (COD)</label>
</li>
</ul>我需要将gateway_4063663的标签替换为一个名为“icon_1.gif”的图像,但我只能使用CSS3访问。有什么办法可以替代这个标签吗。还是设置一个背景图像?
我用的是css
#payment-methods li #gateway_4063663 label { background: url('icon_1.gif'); }但什么都没发生..。
发布于 2013-10-07 04:28:24
我建议你围绕一个<div>标签,并改变<div>的背景。
<div class="TEST">
<label for="gateway_4063663">PagSeguro</label>
</div>更改<div>的背景图像,并将标签的不透明度设置为0。
https://stackoverflow.com/questions/19216925
复制相似问题