HTML 中在一个页面同时打开四个网站 - 使用 iframe
在 HTML 中,可以使用 iframe 元素来实现同时打开四个网站的效果。每个 iframe 元素可以嵌入一个网站,并在同一个页面中显示。以下是一个示例代码:
<!DOCTYPE html>
<html>
<head>
<title>同时访问四个网站</title>
</head>
<body>
<h1>同时访问四个网站</h1>
<div class='container'>
<iframe src='https://www.google.com' width='400' height='300'></iframe>
<iframe src='https://www.facebook.com' width='400' height='300'></iframe>
<iframe src='https://www.twitter.com' width='400' height='300'></iframe>
<iframe src='https://www.youtube.com' width='400' height='300'></iframe>
</div>
</body>
</html>
在上述代码中,我们使用了四个 iframe 元素来嵌入四个不同的网站。每个 iframe 的 src 属性指定了要嵌入的网站 URL。通过设置 width 和 height 属性,可以调整每个 iframe 的大小。
原文地址: https://www.cveoy.top/t/topic/pshT 著作权归作者所有。请勿转载和采集!