shopify - Shopify 边框选择颜色
问题描述
我有 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%}
我真的需要帮助提前谢谢。
解决方案
您可以参考 Shopify 社区论坛,提供了为产品中的颜色创建色板图像的解决方案。请点击这里查看实现。
此解决方案不适用于冒险和无限主题。我在首次亮相主题中实现的是为客户商店工作。
推荐阅读
- sql - 如何有效地标记 SQL 中的连续变化
- azure - 如何获取其他 Azure Active Directory 组织的列表我是使用 API 的来宾用户,例如 Graph
- r - 自动合并数据
- javascript - 如何将菜单(下拉菜单)添加到 vuetify 中的项目列表?
- reactjs - Excel JS - 获取范围数字格式
- compiler-errors - GHDL编译的问题
- selenium - 如何在 ubuntu 机器中使用 selenium 和 java 处理文件上传案例
- c++ - 使用win10编译的Gdal3.0静态库出错!
- keycloak - 如何使用 java keycloak 管理库在 keycloak 中处理多个操作之间的事务
- php - 日期和时间值不会在输入日期时间格式表单框中打印