寒假第20页作业

1.网页元素排列

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>商品分类列表页</title>
		<style>
			.text1{
				border: 2px solid orange;
				width: 200px;
				height: 700px;
				border-radius:8px;
			}
			a:hover{
				color: red;
			}
			a{
				line-height: 40px;
				font-size: 15px;
				height: 5px;
				font-weight: bold;
				padding-left:60px ;
				box-sizing: border-box;
			}
			a{
				text-decoration: none;
			}
			span{
				border: 1px gray dashed;
				display: block;
				width: 180px;
				border-style: none none dashed none;
				margin: 0 auto;
			}
			div p:nth-of-type(1){
				background: url(img/icon_01.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(2){
				background: url(img/icon_02.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(3){
				background: url(img/icon_03.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(4){
				background: url(img/icon_04.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(5){
				background: url(img/icon_05.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(6){
				background: url(img/icon_06.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(7){
				background: url(img/icon_07.jpg) no-repeat;
				background-position: 5px -2px;
			}
			div p:nth-of-type(8){
				background: url(img/icon_08.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(9){
				background: url(img/icon_09.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(10){
				background: url(img/icon_10.jpg) no-repeat;
				background-position: 5px -4px;
			}
		</style>
	</head>
	<body>
		<div class="text1">
			<p><a href="" class="text2">酒水、饮料</a></p>
			<span></span>
			<p><a href="">进口食品</a></p>
			<span></span>
			<p><a href="">休闲零食</a></p>
			<span></span>
			<p><a href="">地方特产</a>
			<span></span>
			<p><a href="">保健、冲调</a></p>
			<span></span>
			<p><a href="">粮油、生鲜</a></p>
			<span></span>
			<p><a href="">美容洗护</a></p>
			<span></span>
			<p><a href="">清洁洗涤</a></p>
			<span></span>
			<p><a href="">母婴、纸品</a></p>
			<span></span>
			<p><a href="">家居百货</a></p>
			
		</div>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>商品分类列表页</title>
		<style>
			.text1{
				border: 2px solid orange;
				width: 200px;
				height: 700px;
				border-radius:8px;
			}
			a:hover{
				color: red;
			}
			a{
				line-height: 40px;
				font-size: 15px;
				height: 5px;
				font-weight: bold;
				padding-left:60px ;
				box-sizing: border-box;
			}
			a{
				text-decoration: none;
			}
			span{
				border: 1px gray dashed;
				display: block;
				width: 180px;
				border-style: none none dashed none;
				margin: 0 auto;
			}
			div p:nth-of-type(1){
				background: url(img/icon_01.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(2){
				background: url(img/icon_02.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(3){
				background: url(img/icon_03.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(4){
				background: url(img/icon_04.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(5){
				background: url(img/icon_05.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(6){
				background: url(img/icon_06.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(7){
				background: url(img/icon_07.jpg) no-repeat;
				background-position: 5px -2px;
			}
			div p:nth-of-type(8){
				background: url(img/icon_08.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(9){
				background: url(img/icon_09.jpg) no-repeat;
				background-position: 5px -4px;
			}
			div p:nth-of-type(10){
				background: url(img/icon_10.jpg) no-repeat;
				background-position: 5px -4px;
			}
		</style>
	</head>
	<body>
		<div class="text1">
			<p><a href="" class="text2">酒水、饮料</a></p>
			<span></span>
			<p><a href="">进口食品</a></p>
			<span></span>
			<p><a href="">休闲零食</a></p>
			<span></span>
			<p><a href="">地方特产</a>
			<span></span>
			<p><a href="">保健、冲调</a></p>
			<span></span>
			<p><a href="">粮油、生鲜</a></p>
			<span></span>
			<p><a href="">美容洗护</a></p>
			<span></span>
			<p><a href="">清洁洗涤</a></p>
			<span></span>
			<p><a href="">母婴、纸品</a></p>
			<span></span>
			<p><a href="">家居百货</a></p>
			
		</div>
	</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值