css习题(用html和css写一个静态的轮播图)

以下是HTML页面的代码:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>中国的流浪猫</title>
    <link rel="stylesheet" type="text/css" href="regality.css">
</head>

<body>
	<div class="box">
		<div class="box-img"><img src="001.jpg" alt=""></div>
		<div class="box-img"><img src="002.jpg" alt=""></div>
		<div class="box-img"><img src="003.jpg" alt=""></div>
		<div class="box-img"><img src="004.jpg" alt=""></div>
		<div class="box-img"><img src="005.jpg" alt=""></div>
		<div class="box-img"><img src="006.jpg" alt=""></div>
		<div class="box-left">&lt;</div>
		<div class="box-right">&gt;</div>
		<div class="box-zhiding">
			<ul>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
				<li></li>
			</ul>
		</div>
	</div>
</body>

</html>

以下是css页面的代码:

.box{
	position: relative;
	width: 1000px;
	height: 600px;
}
.box .box-img{
	position: absolute;
}
.box .box-img img{
	width: 1000px;
	height: 600px;
}
.box .box-left{
	position: absolute;
	left: 0;
	top: 230px;
	width: 35px;
	height: 70px;
	line-height: 70px;
	text-align: center;
	background: #424242;
	color: #ccc;
	border-radius: 0 5px 5px 0;
	cursor: pointer;
	font-size: 30px;
}
.box .box-left:hover{
	color: #fff;
	background: #ff000050;
}
.box .box-right{
	position: absolute;
	right: 0;
	top: 230px;
	width: 35px;
	height: 70px;
	line-height: 70px;
	text-align: center;
	background: #424242;
	color: #ccc;
	border-radius: 5px 0 0 5px;
	cursor: pointer;
	font-size: 30px;
}
.box .box-right:hover{
	color: #fff;
	background: #ff000050;
}

.box .box-zhiding{
	position: absolute;
	bottom: 50px;
	right: 40px;
}
.box .box-zhiding ul{
	list-style: none;
}
.box .box-zhiding li{
	width: 14px;
	height: 14px;
	border-radius: 100%;
	background-color: #ccc;
	float: right;
	margin-right: 10px;
	cursor: pointer;
	font-size: 12px;
}
.box li:hover{
	background-color: #fff;
}
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值