我有 shopify 商店,我在互联网上找到了一个代码,可以用他的图像替换颜色,就像这样。
我真的需要在选择颜色时添加边框,有人可以帮我吗?
代码是这样做的:
{%if option.name == "Couleur"%}
<label>{{option.name}}</label>
{%assign index = forloop.index %}
{%for value in option.values%}
<input class="single-option-selector-{{ section.id }}" id="Couleur-{{forloop.index}}" type="radio" style='visibility:hidden;display:none' name="Couleur" value="{{ value | escape }}" data-index="option{{index}}" {% if option.selected_value == value %}checked{%endif%}/>
<label id="colorSelected" class="label_couleur" for="Couleur-{{forloop.index}}" style="margin: 0 5px;">
<img class="img_couleur" src="{{value | escape | append:'.jpg' | strip | asset_url }}"/>
</label>
{%endfor%}
{%else%}
我真的需要帮助提前谢谢。