3-2 html frameset

源码

  • main.html
<!doctype html>
<html>

	<head>
		<meta name="" content="" charset="utf-8"/>
	</head>
	<!-- framset标签和body标签不能同时用 -->
	<frameset cols="80%, 20%" border="1">
		<frame src="part1.html" >
		<frame src="part2.html" >
	</frameset>

</html>
  • part1.html
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<iframe src="https://bilibili.com" width="100%" height="1200px" name="main_page"></iframe>
	</body>
</html>
  • part2.html
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			body{
				background-color: aqua;
			}
		</style>
		<link rel="stylesheet" type="text/css" href="./css/demo01.css"/>
	</head>
	<!--Style遵循就近原则-->
	<body style="background-color: mediumaquamarine">
	<body>
		<ul>
			<li>
				<a href="https://bilibili.com" target="main_page">BILIBILI</a>
			</li>
			<li>
				<a href="https://www.taobao.com/" target="main_page">淘宝</a>
			</li>
			<li>
				<a href="https://qd.58.com/" target="main_page">58同城</a>
			</li>
		</ul>
	</body>
</html>
  • demo01.css
body{
	background-color: saddlebrown;
}

效果

3-2 html frameset
3-2 html frameset

上一篇:阿里巴巴Java开发手册中的DO、DTO、BO、AO、VO、POJO定义


下一篇:css基础样式和css3选择器