我正在尝试为已经具有 ID (#3872720) 并且属于具有名为的类的父 DIV 的单选按钮输入定义 CSS.catProdAttributeItem
我只是想使用背景图像显示具有此 ID 的图形。出现的属性代码已经由 Business Catalyst 系统创建,因此我无法控制它,我所能做的就是针对输出代码生成的类名称和 ID 名称。
所以我正在努力实现:
text radio bg image:
white o image 1 here
yello o image 2 here
green o image 3 here
black o image 4 here
身体
<div class="catProductAttributeGroup">
<div class="catProdAttributeTitle">Colour</div>
<div class="catProdAttributeItem">
<input id="3872720" name="578278" mandatory="1" type="radio">
<span>White </span></div>
<div class="catProdAttributeItem">
<input id="3872721" name="578278" mandatory="1" type="radio">
<span>Yellow </span></div>
<div class="catProdAttributeItem">
<input id="3872722" name="578278" mandatory="1" type="radio">
<span>Green </span></div>
<div class="catProdAttributeItem">
<input id="3872723" name="578278" mandatory="1" type="radio">
<span>Black </span></div>
CSS
.catProdAttributeItem input{color:#fff; padding-left:30px;}
#3872720 input {padding-left:20px; background-image:url(../images/shop-dot-white.jpg); background-repeat:no-repeat;}
#3872721 input {padding-left:20px; background-image:url(../images/shop-dot-yellow.jpg); background-repeat:no-repeat;}
#3872722 input {padding-left:20px; background-image:url(../images/shop-dot-green.jpg); background-repeat:no-repeat;}
#3872723 input {padding-left:20px; background-image:url(../images/shop-dot-black.jpg); background-repeat:no-repeat;}
问题是我如何定位class="catProdAttributeItem"
和输入id="3872721"
......?
任何帮助将非常感激!