css选择器练习

效果如下:在这里插入图片描述

可以根据特征分为三块,然后每块对应具体样式

代码如下:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#one{
				
				color: white;
				width: 400px;
				height: 40px;
				line-height: 40px;
				background-color: rgb(5,123,193);
				font-size: 20px;
				text-indent: 20px;
				
			}
			.two{
				color: rgb(7,128,207);
				width: 400px;
				height: 35px;
				line-height: 35px;
				background-color: rgb(228,241,250);
				font-size: 20px;
				text-indent: 20px;
			}
			.three{	
				width: 400px;
				/* height: 50px;
				line-height: 50px;	 */
			}
			p{
				text-indent: 16px;
			}
		</style>
	</head>
	<body>
		<div id="one">
			家用电器
		</div>
		<div class="two">
			大家电
		</div>
		<div class="three">
			<p>平板电视  洗衣机  冰箱</p>
			<p>空调  烟机/灶具  热水器</p>
			<p>冷柜/酒柜  消毒柜  家庭影院</p>
		</div>
		<div class="two">
			生活电器
		</div>
		<div class="three">
			<p>电风扇  净化器  吸尘器</p>
			<p>净水设备  挂烫机  电话机</p>
		</div>
		<div class="two">
			厨房电器
		</div>
		<div class="three">
			<p>榨汁机  电压力锅  电饭煲</p>
			<p>豆浆机  微波炉  电磁炉</p>
		</div>
		<div class="two">
			五金家装
		</div>
		<div class="three">
			<p>淋浴/水槽  电动工具  手动工具</p>
			<p>仪器仪表  浴霸/排气  灯具</p>
		</div>
	</body>
</html>

页面效果如下:
在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值