【网页设计】尝试制作北大(2013年旧版)静态官网(HTML/CSS)

任务要求:

尝试制作北大官网静态页面(官网页面如下)
在这里插入图片描述

一、制作出整体结构:

1、结构示意图如下:
在这里插入图片描述
2、制作出结构图的代码:
北大官网.html 代码如下:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/myweb.css" />
	</head>

	<body>
		<div class="header">
			<div class="logo">北大logo</div>
			<div class="nav-lan">
				<div class="language">选择语言</div>
				<div class="nav">导航</div>
			</div>
		</div>
		<div class="center">
			<div class="cen-left">风景图片</div>
			<div class="cen-right">
				<div class="cen-right-up">
					<div class="cru-left">
						<div class="crul-top">北大新闻</div>
						<div class="crul-center">通知公告</div>
						<div class="crul-bottom">北大校内信息</div>
					</div>
					<div class="cru-right">图文热点</div>
				</div>
				<div class="cen-right-bottom">其他页面地址</div>
			</div>
		</div>
		<div class="footer">版权信息</div>
	</body>

</html>

myweb.css文件

* {
   padding: 0;
   margin: 0;
}
.header {
   width: 970px;
   height: 103px;
   /*background-color: green;*/
   margin: 0 auto;
}
.header .logo {
   float: left;
   width: 277px;
   height: 103px;
   background-color: red;
}
.header .nav-lan {
   float: left;
   width: 679px;
   height: 103px;
   margin-left: 14px;
   /*background-color: green;*/
}
.header .nav-lan .language {
   float: right;
   width: 137px;
   height: 49px;
   background-color: green;
}
.header .nav-lan .nav {
   float: right;
   width: 679px;
   height: 46px;
   background-color: green;
   margin-top: 8px;
}

.center {
   width: 970px;
   height: 435px;  
   /*background-color: yellow;*/
   margin: 0 auto;
   margin-top: 10px;
}
.center .cen-left{
    float: left;
	width: 310px;
	height: 435px;
	background-color: orange;
}

.center .cen-right{
   float: left;
   width: 650px;
   height: 435px;
   margin-left: 10px;
   /*background-color: blue;*/
}

.center .cen-right .cen-right-up{
   float: left;
   width: 650px;
   height: 400px;
   /*background-color: blue;*/
}
.center .cen-right .cen-right-up .cru-left{
   float: left;
   width: 450px;
   height: 400px;
   /*background-color: blue;*/
}
.center .cen-right .cen-right-up .cru-left .crul-top{
   float: left;
   width: 450px;
   height: 240px;
   background-color: deepskyblue;
}
.center .cen-right .cen-right-up .cru-left .crul-center{
   float: left;
   width: 450px;
   height: 110px;
   margin-top: 10px;
   margin-bottom: 10px;
   background-color: deepskyblue;
}
.center .cen-right .cen-right-up .cru-left .crul-bottom{
   float: left;
   width: 450px;
   height: 30px;
   background-color: deepskyblue;
}
.center .cen-right .cen-right-up .cru-right{
   float: left;
   width: 190px;
   height: 400px;
   margin-left: 10px;
   background-color: mediumpurple;
}
.center .cen-right .cen-right-bottom{
   float: left;
   width: 650px;
   height: 25px;
   margin-top: 10px;
   background-color: green;
}
.footer {
   width: 970px;
   height: 35px; 
   background-color: blue;
   margin: 0 auto;
   margin-top: 10px;
}

3、运行结构图结果:
在这里插入图片描述

发布了86 篇原创文章 · 获赞 83 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/qq_41856733/article/details/96353344