18910140161

HTML-在Shopify上添加到Vimeo视频的链接-堆栈溢出

顺晟科技

2022-10-18 13:38:27

163

在我们的网站上,我们使用Vimeo来显示";签名样式";的轮播视频在我们的主页上我想添加一个链接,这样当你点击这个视频时,它会引导你";签名样式";页面.

我刚开始使用液体/购物。我知道如何在HTML中做到这一点,但它似乎并不像我想象的那样工作。

下面是";background-video.liquid";中的原始代码文件:

<代码><;节类=";节";ID=";section-{{section.ID}}";data-section-ID=";{{section.ID}}";data-section-type=";background-video";data-section-settings='{{节_设置}}'>;<;DIV类=";ImageHero{%if Section.Settings.Section_大小!=' normal '%}ImageHero--{{Section.Settings.Section_大小}{%endif%}";>;<;DIV类=";ImageHero__录像机";>;<;/DIV>;<;/DIV>;<;/部分>;

下面是一些代码,我试图用来替换上面的行:

<代码><;a href=";https://www.clarasunwoo.com/search?q=signature+styles&type=product";><;DIV style=";填充:56.25%000;位置:相对;";>;<;iframe SRC=";https://vimeo.com/540236561" style=";位置:绝对;顶部:0;左侧:0;宽度:100%;高度:100%;";FrameBorder=";0";允许=";自动播放全屏";AllowFullScreen>;<;/IFrame>;<;/DIV>;<;脚本SRC=";https://player.vimeo.com/api/player.js"><;/a>;

顺晟科技:

所有你需要做的就是创建一个覆盖DIV";块";通过z索引与实际iFrame交互。然后,您可以使用JavaScript来处理用户的单击和重定向。

<section class="Section" id="section-{{ section.id }}" data-section-id="{{ section.id }}" data-section-type="background-video" data-section-settings='{{ section_settings }}'>
  <div class="ImageHero {% if section.settings.section_size != 'normal' %}ImageHero--{{ section.settings.section_size }}{% endif %}">
    <div class="ImageHero__VideoHolder"></div>
  </div>
</section>
  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航