向Shopify添加自定义CSS和JS [英] Adding custom CSS and JS to Shopify

查看:1829
本文介绍了向Shopify添加自定义CSS和JS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用大西洋主题,在Shopify上获取页面的垂直标签。
由于这个主题在默认情况下没有垂直选项卡,我使用外部JS和CSSjquery-jvert-tabs。

I am working on getting vertical tabs for a page on Shopify, using the 'Atlantic' theme. As this theme does not have vertical tabs by default, I have used the external JS and CSS "jquery-jvert-tabs".

我的问题是,如果我将JS和CSS文件作为资产上传,我如何将它们链接到我想使用它们的页面以及如何使用

My question is, if I upload the JS and CSS files as assets, how do I link them to the page on which I want to use these and how to make use of these on the page after that, if I have certain style elements available there too?

推荐答案

只需上传您的<$ c $

Simply upload your filename.js file in the assets folder.

assets 文件夹中的 filename.js c> theme.liquid head 部分:

then drop the following in your theme.liquid head section:

{{ 'filename.js' | asset_url | script_tag }}

顺便说一句,你应该重命名你的文件并添加.liquid扩展

filename.js.liquid

祝你好运!

这篇关于向Shopify添加自定义CSS和JS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆