WEB前端第三次作业

西工商官网栏代码以及网页版如下

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Document</title>
		<style>
			* {
				margin: 0;
				padding: 0;
			}

			.container {
				background: #9a3032;
				height: 70px;
				width: 100%;
			}

			.nav>div {
				float: left;
				color: white;
				margin-left: 20px;
				line-height: 70px;
				padding-left: 5px;
				padding-right: 5px;
				position: relative;
			}

			.nav {
				width: 900px;
				height: 70px;
				margin: auto;
			}

			.nav>div:hover {
				color: #9a3032;
				background: white;
				transition: 0.3s;
			}

			.nav>div:hover>.menu {
				display: block;
			}

			.menu>ul>li {
				color: black;
				line-height: 30px;
				margin-left: 40px;
				font-size: 14px;
				list-style: none;
			}



			.menu>* {
				float: left;
			}

			.menu {
				background-color: white;
				width: 300px;
				display: none;
				position: absolute;
				padding: 10px;
				left: 0px;
			}

			body>img:nth-child(2) {
				width: 100%;
			}

			.menu>ul>li::before {
				display: inline-block;
				content: "";
				width: 5px;
				height: 5px;
				border-radius: 50%;
				background-color: #9a3032;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<div class="nav">
				<div>首页</div>
				<div>学校概况
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>学校简介</li>
							<li>校长寄语</li>
							<li>学校领导</li>
							<li>学校风光</li>
							<li>学校标识</li>
						</ul>
					</div>
				</div>
				<div>组织机构
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>党群机构</li>
							<li>行政部门</li>
							<li>二级学院</li>
						</ul>
					</div>
				</div>
				<div>党群工作
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>党建工作</li>
							<li>团委工作</li>
							<li>工会工作</li>
						</ul>
					</div>
				</div>
				<div>教育教学
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>本科教育</li>
							<li>职业教育与继续教育</li>
							<li>教研与科研</li>
							<li>教学动态</li>
						</ul>
					</div>
				</div>
				<div>校园生活
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>校园设施</li>
							<li>教学设施</li>
							<li>餐饮服务</li>
							<li>住宿服务</li>
							<li>网络服务</li>
							<li>综合服务</li>
						</ul>
					</div>
				</div>
				<div>学生服务
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>学工动态</li>
							<li>学生会</li>
							<li>学生资助</li>
							<li>心理健康</li>
							<li>资料下载</li>
						</ul>
					</div>
				</div>
				<div>招生就业
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>招生网</li>
							<li>就业网</li>
						</ul>
					</div>
				</div>
				<div>人才招聘
					<div class="menu">
						<img src="img/3.png" alt="">
						<ul>
							<li>招聘公告</li>
							<li>联系我们</li>
						</ul>
					</div>
				</div>
				<div>校友会</div>
			</div>
		</div>
		<img src="img/xgs.png" alt="">
	</body>
</html>

淘宝商品代码以及网页版如下

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.goods {
				width: 250px;
				height: 390px;
				border: 1px solid red;
			}

			.goods>.xx>img {
				display: block;
				width: 250px;
				height: 250px;
				border: 1px solid rebeccapurple;
			}

			.text>div {
				margin: 5px;
			}

			.price>span {
				vertical-align: middle;
			}

			.price>span:first-child {
				color: #eb5628;
				font-weight: bold;
				font-size: 20px;
				line-height: 20px;
			}

			.price>span:nth-child(2) {
				background-color: #eb5628;
				color: white;
				font-size: 13px;
				line-height: 20px;
			}

			.price>span:last-child {
				float: right;
				font-size: 13px;
				color: #777;
			}

			.des>a>label {
				font-size: 13px;
			}

			.des>a>label:first-child {
				color: #eb5628;
			}

			.des>a:link {
				text-decoration: none;
				color: black;
			}

			.des>a:visited {
				color: black;
			}

			.des>a:hover {
				color: #eb5628;
				text-decoration: underline;
			}

			.shop_info>a:visited {
				color: #777;
			}

			.shop_info>a {
				font-size: 13px;
			}

			.shop_info>label {
				float: right;
				font-size: 13px;
				color: #777;
			}

			.icon_info>span:first-child {
				background: url('img/sprite.png');
				background-size: 610px 600px;
				display: inline-block;
				background-position: -375px -400px;
				width: 32px;
				height: 32px;
			}

			.icon_info>span:last-child {
				background: url('img/2222.png');
				background-size: 860px 852px;
				display: inline-block;
				background-position: -344px -646px;
				width: 32px;
				height: 32px;
				border: 1px solid red;
				float: right;
			}
			.xx{
			 width: 256px;
			 height: 255px;
			 position: relative;
			}
			.intro{
			 width: 252px;
			 height: 25px;
			 background-color: orange;
			 position: absolute;
			 left: 0;
			 right: 0;
			 bottom: 2px;
			 display: none;
			 }
				.intro>span {
					display: inline-block;
					width: 108px;
				}
				
				.intro>span:last-child {
					width: 107px;
					border-left: 1px solid white;
				}
				
				.intro>span {
					color: #eb5628;
					font-weight: bold;
					font-size: 20px;
					line-height: 20px;
				}
				.goods>.xx:hover>.intro{
					display: block;
				}
			
		</style>
	</head>
	<body>
		<div class="goods">
			<div class="xx">
				<img src="img/2.webp" width="250px" height="200px" alt="">
				<div class="intro">
				<span>找同款</span>
				<span>找相似</span>
			</div>

		</div>
		<div class="text">
			<div class="price">
				<span>¥12.80</span>
				<span>包邮</span>
				<span>1万+人付款</span>
			</div>
			<div class="des">
				<a href="#">
					<label for="des">鸡你太美</label>
					<label for="">手办摆件恶搞ikun小黑子蔡徐坤公仔小玩偶车摆件小玩具</label>
				</a>
			</div>
			<div class="shop_info">
				<a href="">信誉玩具专营店</a>
				<label>浙江 金华</label>
			</div>
			<div class="icon_info">
				<span></span>
				<span></span>
			</div>
		</div>
		</div>


	</body>
</html>

 

 测试题6-10代码以及网页版如下

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			div:first-child {
				border: 1px solid red;
				height: 50px;
				width: 50px;
				border-top-left-radius: 20%;
				border-bottom-right-radius: 20%;
			}

			div:nth-child(3) {
				height: 50px;
				width: 50px;
				border-top: 1px solid green;
				border-left: 1px solid yellow;

			}

			a:link {
				text-decoration: none;
				color: green;

			}

			a:visited {
				color: black;
			}

			a:hover {
				color: red;
			}

			a:active {
				color: yellow;
			}

			body>span {
				display: block;
				width: 200px;
				height: 200px;
				border: 1px solid blue;
				font-size: 20;
				text-align: center;
				line-height: 200px;
				text-decoration: underline;
				font-weight: bold;
			}

			.ol_first>li {
				list-style: none;
			}

			.ol_first>li::before {
				display: inline-block;
				content: "";
				border: 1px solid black;
				border-radius: 50%;
				width: 10px;
				height: 10px;
				margin-right: 10px;
			}

			.ul_first>li:nth-child(even) {
				border: 1px solid blue;
				padding: 10px;
				margin: 10px;


			}

			.ol_second>* {
				border: 1px solid blue;
			}

			body{
				position: relative;
			}

			body>.ol_second>div{
				position: absolute;
				bottom: 0px;
			}

			body>div:nth-child(8) {
				width: 200px;
				height: 300px;
				text-shadow: 2px 2px 3px rebeccapurple;
			}
			p{
				border: 1px solid red;
				width: 200px;
				height: 20px;
				text-overflow: ellipsis;
				overflow: hidden;
			}

			
		</style>
	</head>
	<body>
		<div></div>
		<span>哈哈哈哈</span>
		<div></div>
		<span></span>
		<ol class="ol_first">
			<li id="item1">子项1</li>
			<li id="item2">子项2</li>
			<li id="item3">子项3</li>
			<ul class="ul_first">
				<li id="item21">子项21</li>
				<li id="item22">子项22</li>
				<li id="item23">子项23</li>
			</ul>
			</li>
		</ol>
		<ol class="ol_second">
			<li>子项31</li>
			<li>子项32</li>
			<div>div33</div>
			<a href="#">这是一个a链接</a>

		</ol>
		<p>uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu</p>
		<div>button</div>
	</body>
</html>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Cherry-1

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值