【问题标题】:How to code external images and icons in a Squarespace site?如何在 Squarespace 网站中编码外部图像和图标?
【发布时间】:2020-10-01 10:52:25
【问题描述】:

enter image description here我在 squarespace 上通过 HTML 编码的图标和图像未显示。我唯一能看到的是缩略图图标,但没有图像。此外,我的 .svg 形式的图标也是如此。

<section id="collaborate-services-2">
            <div class="container">
                <div class="services">
                    <div>
                      <img class=”img-consulting” src=”” />
                        <div class="services-1"></div>
                            <div class="clr"></div>
                            <h3>Consulting</h3>
                    </div>
                    <div>
                        <img class=”img-training” src=”” />
                            <div class="services-2"></div>
                        <div class="clr"></div>
                        <h3>Training</h3>
                    </div>
                    <div>
                        <img class=”img-speaking” src=”” />
                            <div class="services-3"></div>
                        <div class="clr"></div>
                        <h3>Public Speaking</h3>
                    </div>
                </div>
              <btn>Ask Me</btn>
            </div>
        </section>

【问题讨论】:

  • 您可以编辑您的答案并添加您在 Squarespace 中添加的代码吗?您还可以添加您所看到内容的屏幕截图或相关页面的链接吗?最后,你是通过代码块添加的吗?
  • 我已经添加了代码,是的,我正在使用代码块。

标签: html image icons squarespace


【解决方案1】:

在 Squarespace 代码块上添加外部图像有两种方法:

  1. 图像/图标必须托管在另一个站点上,并且您将 Squarespace 上的链接放在代码块中,

  2. 您将图片上传到图库部分或未链接的页面。上传后,您将获得为图像生成的 squarespace 链接。使用浏览器选项复制它的图像地址并在代码块中使用它。

注意:如果您删除图片,链接也将被删除。该链接不会在同一天被删除。因为 Squarespace 会将图像缓存多几天。

【讨论】:

  • 谢谢。我尝试了部分选项,但图像尚未显示。我假设是因为我处于预览模式。
  • 我有实时网站,其中添加了这样的图像。可能您应该检查新浏览器选项卡上的图像链接,看看是否可以看到图像。如果您看不到图片,则表示您没有正确复制图片链接。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-05-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-06-02
  • 1970-01-01
相关资源
最近更新 更多