资讯专栏INFORMATION COLUMN

关于轮播图的制作

daryl / 2595人阅读

摘要:今天看了好久写了好久注释都在代码里直接上代码了今天写这个的时候意识到了变量的重要性在这里面下路导航的变量跟上边含图片的标签的变量分不清很难受以后不能这么写关于轮播图呢感觉思路还是要自己写几遍来的清晰不然怎么着都是白搭这是我隔了几天写出来的

今天看了好久 写了好久 注释都在代码里 直接上代码了
今天写这个的时候 意识到了变量的重要性
在这里面下路导航的变量跟上边含图片的标签的变量分不清 很难受以后不能这么写

关于轮播图呢  感觉思路还是要自己写几遍来的清晰  不然怎么着都是白搭

这是我隔了几天写出来的两种效果吧可能  估计也算是大同小异

在这里贴出来 与大家共勉

DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>轮播图啊QAQtitle>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 590px;
            height: 470px;
            margin: 100px auto;
            border: 2px solid #ccc;
        }

        img {
            vertical-align: top;
        }

        .inner {
            width: 590px;
            height: 470px;
            position: relative;

            overflow: hidden;

        }

        .inner ul {
            width: 1000%;
            position: absolute;
            left: 0;
            top: 0;
        }

        .inner li {
            float: left;
            list-style: none;
        }

        .indicators {
            width: 1000%;
            position: absolute;
            left: 490px;
            top: 452px;
        }

        .indicators ul {
            width: 100px;
            height: 18px;
            background: rgba(0, 0, 0, 0.1);
            line-height: 15px;
            border-radius: 10px;
        }

        .indicators li {
            float: left;
            border-radius: 50%;
            width: 15px;
            height: 15px;
            background-color: #fff;
            text-align: center;
            margin-right: 10px;
            font-size: 10px;
            cursor: pointer;
        }

        .indicators .current {
            background-color: skyblue;
        }

        .hah {
            position: relative;
            left: 0;
            top: 220px;
            display: none;
        }

        .hah span {
            display: block;
            width: 30px;
            height: 30px;
            text-align: center;
            color: #fff;
            font-size: 20px;
            cursor: pointer;
            background: rgba(0, 0, 0, 0.3);

        }

        .left {
            position: absolute;
            left: 0;
        }

        .right {
            position: absolute;
            right: 0;
        }
    style>
head>
<body>
<div id="box" class="box">
    <div class="inner" id="ph">
        <ul>
            <li><a href="#"><img src="11.jpg" alt="">a>li>
            <li><a href="https://sale.jd.com/act/GirplhRxAm8z1.html"><img src="22.jpg" alt="">a>li>
            <li><a href="#"><img src="33.jpg" alt="">a>li>
            <li><a href="#"><img src="44.jpg" alt="">a>li>
            
              
  
最新活动
阅读需要支付1元查看
<