CSS案例 • 【第7章 横幅广告滑块】

全部章节 >>>>


练习一

  • <横幅广告滑块>
    在这里插入图片描述
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        li {
            list-style: none;
        }
        .outter {
            width: 590px;
            height: 470px;
            background-color: red;
            margin: auto;
            position: relative;
        }
        img {
            width: 100%;
            height: 100%;
        }
        .w-resize {
            height: 35px;
            line-height: 30px;
            width: 25px;
            background-color: rgba(0,0,0,.15);
            color: white;
            text-align: center;
            border-radius: 0 25px 25px 0;
            font-size: 20px;
            font-weight: 900;
            position: absolute;
            top: 50%;
            left: 0;
            margin-top: -10px;
            cursor: pointer;
        }
        .e-resize {
            height: 35px;
            line-height: 30px;
            width: 25px;
            background-color: rgba(0,0,0,.15);
            color: white;
            text-align: center;
            border-radius: 25px 0 0 25px;
            font-size: 20px;
            font-weight: 900;
            position: absolute;
            right: 0;
            top: 50%;
            margin-top: -10px;
            cursor: pointer;
        }
        .ub {
            list-style-type: none;
            display: block;
            position: absolute;
            left: 50%;
            bottom: 10%;
            transform: translateX(-50%);
        }
        .ub li {
            background-color: rgba(0,0,0,0.1);
            width: 10px;
            height: 10px;
            float: left;
            border-radius: 5px;
            margin: 0px 3px;
            transition: all 0.3s;
        }
        .ub li:hover {
            background-color: rgba(0,0,0,0.6);
            transform: scale(1.3,1.3);
            cursor: pointer;
        }
        .pad {

        }
    </style>
</head>
<body>
<div class="outter">
    <div class="img"><img src="图片/banner_2.webp" alt=""></div>
    <div class="w-resize">&lt</div>
    <div class="e-resize">&gt</div>
    <div class="dian">
        <ul class="ub">
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</div>
</body>
</html>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值