藏盒中隐藏工具栏项目

发布于 2025-02-11 10:54:34 字数 471 浏览 1 评论 0原文

我试图摆脱Fancybox V4上的工具栏按钮,但似乎无法正常工作。我在编码网站或JavaScript方面的经验不太经验,因此,如果我缺少简单的内容,我深表歉意。

我正在使用Shopify并拥有:

    Fancybox.bind('[data-fancybox="gallery"]', {
      Toolbar: {
      display: [
        { id: "prev", position: "center" },
        { id: "counter", position: "center" },
        { id: "next", position: "center" },
        "close",
      ],
    },
  }); 

它是基于我在文档中阅读时基于的,但是我认为我缺少某些内容,因为幻灯片,缩放和其他按钮仍然出现在右上角。

谢谢您的任何帮助!

I'm trying to get rid of the toolbar buttons on fancybox v4 but can't seem to get it work. I'm not very experienced with coding websites or with javascript, so my apologies if I'm missing something simple.

I'm using shopify and have:

    Fancybox.bind('[data-fancybox="gallery"]', {
      Toolbar: {
      display: [
        { id: "prev", position: "center" },
        { id: "counter", position: "center" },
        { id: "next", position: "center" },
        "close",
      ],
    },
  }); 

It's based off when I read in the docs, but I think I'm missing something because the slideshow, zoom and other buttons all still appear in the top right.

Thank you for any help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

善良天后 2025-02-18 10:54:34

我想简单的CSS显示属性可能会解决此问题。要隐藏某些东西,请使用display:none;,显示项目,使用display:block;

I guess simple CSS display attribute might solve this issue. To hide something, use display: none;, to show item, use display: block;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文