Javascript 动画图标+。平方空间中的js

Javascript 动画图标+。平方空间中的js,javascript,html,squarespace,Javascript,Html,Squarespace,我正在尝试将一些动画图标添加到我的squarespace模板中,如下所示: Insert this string to your HTML head: ```html <script src="https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bodymov

我正在尝试将一些动画图标添加到我的squarespace模板中,如下所示:

Insert this string to your HTML head:
```html
<script src="https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.5.9/bodymovin.min.js"></script>
```
And initialize it before the body closes:

```html
<script>
    var titanic = new Titanic();
</script>
```
This way, you can add icons anywhere in your HTML using this tag:
```html
<div class='titanic titanic_chat'></div>
```
Where chat can be any of these:
* caps
* chat
* checkbox
* expand
* cheap
* expensive
* idea
* mailbox
* mic
* no-mic
* online
* pause
* power
* shopping
* smile
* stop
* unlock
* zoom

### Hosting your images

If you'd like to host your images on your server instead of rawgit, pass the base URL with the init() function:
```javascript
titanic.begin('/my/base/directory/');
```
Then, if you have a div with id="chat", Titanic will search for icons in /my/base/directory/chat.json.

通过CDN安装它们的说明如下:

Insert this string to your HTML head:
```html
<script src="https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.5.9/bodymovin.min.js"></script>
```
And initialize it before the body closes:

```html
<script>
    var titanic = new Titanic();
</script>
```
This way, you can add icons anywhere in your HTML using this tag:
```html
<div class='titanic titanic_chat'></div>
```
Where chat can be any of these:
* caps
* chat
* checkbox
* expand
* cheap
* expensive
* idea
* mailbox
* mic
* no-mic
* online
* pause
* power
* shopping
* smile
* stop
* unlock
* zoom

### Hosting your images

If you'd like to host your images on your server instead of rawgit, pass the base URL with the init() function:
```javascript
titanic.begin('/my/base/directory/');
```
Then, if you have a div with id="chat", Titanic will search for icons in /my/base/directory/chat.json.
将此字符串插入HTML头:
```html
```
并在主体关闭前对其进行初始化:
```html
var泰坦尼克号=新泰坦尼克号();
```
这样,您可以使用以下标记在HTML中的任何位置添加图标:
```html
```
其中聊天可以是以下任意一种:
*帽子
*聊天
*复选框
*扩展
*便宜的
*昂贵的
*意念
*信箱
*麦克风
*没有麦克风
*在线
*停顿
*权力
*购物
*微笑
*停止
*解锁
*变焦
###托管您的图像
如果要在服务器上而不是在rawgit上托管图像,请使用init()函数传递基本URL:
```javascript
泰坦尼克号开始('/my/base/directory/');
```
然后,如果您有一个id=“chat”的div,泰坦尼克号将在/my/base/directory/chat.json中搜索图标。
但是,在完成这些步骤、安装库并初始化代码后,我使用建议的代码插入了一个html块:

<div class='titanic titanic_chat'></div>

但什么也没发生

关于这个问题有什么想法吗


我使用的是squarespace的Sophia模板。

老实说,它很可能没有正确安装。包括一个链接到您的网站,我们将能够告诉您的问题是,我正在修改一个不同于当前在线模板的模板。除了在标题上设置的脚本标记之外,我还没有安装任何东西。老实说,它很可能没有正确安装。包括一个链接到您的网站,我们将能够告诉您的问题是,我正在修改一个不同于当前在线模板的模板。除了在标题上设置的脚本标记之外,我还没有安装任何东西。