html现代iframe框架代码(推荐)
<!DOCTYPE html>
<html>
<head>
<title>iframe网页嵌入示例</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
display: flex;
height: 100vh;
}
.sidebar {
width: 25%;
background: #f0f0f0;
padding: 20px;
}
.content {
width: 75%;
}
iframe {
width: 100%;
height: 100%;
border: none;
}
</style>
</head>
<body>
<div class=”container”>
<div class=”sidebar”>
<h2>导航菜单</h2>
<ul>
<li><a href=”page1.html” target=”contentFrame”>页面1</a></li>
<li><a href=”page2.html” target=”contentFrame”>页面2</a></li>
<li><a href=”page3.html” target=”contentFrame”>页面3</a></li>
</ul>
</div>
<div class=”content”>
<iframe name=”contentFrame” src=”welcome.html”></iframe>
</div>
</div>
</body>
</html>
阿里搜罗 » html现代iframe框架代码(推荐)