Javascript 如何将网站链接添加到HTML网站?

Javascript 如何将网站链接添加到HTML网站?,javascript,html,css,Javascript,Html,Css,我知道如何将图片添加到html网站,但有一件事我不知道怎么做,即使在网上搜索了很多网站 我在其他IDE上使用java脚本创建了一个小动画,并复制了输出的链接: 我想将此链接粘贴到我的html网站上,但我不知道如何粘贴。如果我使用常规的,它将不起作用 基本上,动画是在Java脚本中编码的,js的代码如下: import Vue from "vue"; import App from "./App.vue"; import TypeIt from "

我知道如何将图片添加到html网站,但有一件事我不知道怎么做,即使在网上搜索了很多网站

我在其他IDE上使用java脚本创建了一个小动画,并复制了输出的链接:

我想将此链接粘贴到我的html网站上,但我不知道如何粘贴。如果我使用常规的
,它将不起作用

基本上,动画是在
Java脚本中编码的,js的代码如下:

import Vue from "vue";
import App from "./App.vue";
import TypeIt from "typeit";

Vue.config.productionTip = false;

new Vue({
  render: h => h(App)
}).$mount("#app");

new TypeIt("#inner-demo-2", {
  speed: 100,
  lifelike: true,
  cursor: true,
  cursorSpeed: 200,
  loop: true
})
  .pause(1000)
  .type('<span style="font-family: Segoe UI Emoji">As others have mentioned, using an iframe would be your best bet if you want to display the actual app on your website.

This is how you would implement the iframe.

<iframe src="https://g2mjl.csb.app/" title="My App"></iframe>
从“Vue”导入Vue;
从“/App.vue”导入应用程序;
从“TypeIt”导入TypeIt;
Vue.config.productionTip=false;
新Vue({
渲染:h=>h(应用程序)
}).$mount(“#app”);
新的TypeIt(#inner-demo-2){
速度:100,,
栩栩如生:是的,,
光标:对,
游标速度:200,
循环:正确
})
.暂停(1000)

.type(“如其他人所述,如果您希望在网站上显示实际应用程序,那么使用iframe将是您的最佳选择

这就是实现iframe的方式

<h2>Iframe - Target for a Link</h2>

<iframe src="demo_iframe.htm" name="iframe_a" height="300px" width="100%" title="Iframe Example"></iframe>

<p><a href="https://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>

<p>When the target attribute of a link matches the name of an iframe, the link will open in the iframe.</p>

也就是说,iframe是很棘手的。根据网站的不同,iframe阻止策略可能会阻止你嵌入你的应用程序

更多信息和信息

现在,如果你想要的只是一个gif,我已经为你做了,不过,你可能想上传你自己的类似的东西

以下是我从你的应用程序创建的gif的链接:

您还可以通过运行下面的代码段来查看它:

您可以使用以下代码:

Iframe-链接的目标

当链接的目标属性与iframe的名称匹配时,链接将在iframe中打开

<h2>Iframe - Target for a Link</h2>

<iframe src="demo_iframe.htm" name="iframe_a" height="300px" width="100%" title="Iframe Example"></iframe>

<p><a href="https://www.w3schools.com" target="iframe_a">W3Schools.com</a></p>

<p>When the target attribute of a link matches the name of an iframe, the link will open in the iframe.</p>

这不是GIF。如果我在该链接上查看源代码,它就是一个成熟的网站。你知道我可以如何将其添加到我的网站吗?首先,不要称之为GIF。你在我们正在处理的问题上一下子误导了人们。其次,我在你的网站中嵌入另一个网站的第一个想法是一个iframe。你能给我看看吗?我现在也会更改我的标题这是一个Vue应用程序,所以要么充分了解Vue,知道如何将其集成到你自己的网站中,要么如果你只是想让它“像图像一样”:将动画截屏为GIF或甚至电影,然后将其与
一起放在您的网站上。非常感谢。我可以知道您是如何使用该应用程序创建GIF的吗?是的,您可以在此处下载该应用程序:-我应该提到它是Mac。如果您在Windows上,请使用此免费选项:另外,如果这对您有帮助,请记住投票⬆️ 和/或标记正确✔️ - 快乐编码!你能用这个链接制作gif吗?我没有windows和mac,因为我在chromebook上,所以你能帮我一个小忙吗?请看上面更新的代码,它应该有你的新gif。