<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<iframe src="https://www.bilibili.com" name="lin" frameborder="0"width="1000px"height="800px"></iframe>
<a href=""target="lin">点击跳转</a>
</body>
</html>

内联框架:就是在一个网站里面内敛,嵌套另一个网站。

上面代码的意思是

<iframe src="https://www.bilibili.com" name="lin" frameborder="0"width="1000px"height="800px"></iframe>

内联了网站哔哩哔哩,我们叫它,lin,宽度为1000px,高位800px。

name一般是给target定位的。

<a href=""target="lin">点击跳转</a>

点击“点击跳转”这定位到lin。当这里没有设定条件的话则,iframe覆盖a href,如果a href有条件则,a href优先。

跳转完还是这页。

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<iframe src="https://www.bilibili.com" name="lin" frameborder="0"width="1000px"height="800px"></iframe>
<a href="https://ai.taobao.com"target="lin">点击跳转</a>
</body>
</html>

跳转完为:

 

posted on 2022-07-03 00:23  阿霖找BUG  阅读(45)  评论(0)    收藏  举报