Shopify. 如何将下拉菜单添加到Mega menu
2016年6月13日
本教程展示了如何将下拉菜单添加到您的 Shopify store.
打开站点管理面板并导航到 Online Store -> Themes.
找到要编辑的主题,单击 … 按钮,然后点击 Edit HTML/CSS.
Under the Config 文件夹,找到并点击 settings_schema.json 日期和öffnen在网上代码 editor.
在在线代码中 editor,添加以下代码:
{ “类型”:“link_list”, “id”:“megamenu5_sub”, “标签”:“下拉” },
Under the Snippets 文件夹,找到并点击 widget-megamenu.liquid 文件在联机代码中打开它 editor.
在在线代码中 editor,为添加代码 dropdown 第5项行后:
{{ settings.megamenu5_text }}{% if settings.megamenu5_badge and settings.megamenu5_badge != '' %} {% endif %}
{% capture linklist_iteration %}megamenu5_sub{% endcapture %} {% capture linklist_name %}{{settings[linklist_iteration]}}{% endcapture %}
-
{链接列表中链接的百分比[linklist_name].links %}
- {{ link.Title | link_to:链接.url }} {% endfor %}
Under the Assets 文件夹,找到并点击 style.css.liquid 文件在联机代码中打开它 editor.
在在线代码中 editor, add the dropdown styles:
li.megamenu_item_5 { 位置:相对; } .sf-menu > li.megamenu_item_5 > ul { 宽度:200 px; 位置:绝对的; left: 0; 上图:50 px; } .sf-menu > li.megamenu_item_5 > ul li a { padding-left: 5 px; padding-bottom: 10 px; 字体大小:25 px;}
Save 您的更改.
导航到 Online Store -> Themes > Customize theme > Mega Menu 然后加上 dropdown 菜单项的菜单(在本例中是第5项).
请随时查看下面的详细视频教程:
Shopify. 如何将下拉菜单添加到Mega menu