美文网首页
day02(2017.9.21)

day02(2017.9.21)

作者: 晴_eeca | 来源:发表于2017-09-21 21:27 被阅读18次

轮播图

//html
<div class="box">
    <a href="#" class="one">1</a>
    <a href="#" class="two">2</a>
    <a href="#" class="three">3</a>
    <div class="move">
        <div class="list1"></div>
        <div class="list2"></div>
        <div class="list3"></div>
    </div>
</div>
//css
.box{
            width: 600px;
            height: 400px;
            margin: 100px auto;
            overflow: hidden;
            position: relative;
        }
        .move{
            width: 1800px;
            position: absolute;
        }
        .move>div{
            width: 600px;
            height: 400px;
            float: left;
            background-size: 600px 400px;
        }
        .list1{
            background: url("images/01.jpg") no-repeat center;
        }
        .list2{
            background:  url("images/02.jpg") no-repeat center;
        }
        .list3{
            background: url("images/03.jpg") no-repeat center;
        }
        a{
            display: inline-block;
            width: 50px;
            line-height: 50px;
            text-align: center;
            font-size: 16px;
            color: white;
            text-decoration: none;
            border: 1px solid #ccc;
            border-radius: 50%;
            margin: 10px auto;
            cursor: pointer;
        }
        .one{
            background: red;
        }
        .two{
            background: green;
        }
        .three{
            background: blue;
        }
        .one:focus +.two+.three+.move{
            left: 0;
        }
        .two:focus+.three+.move{                       
            left: -600px;
        }
        .three:focus+.move{
            left: -1200px;
        }
重要程序
.one:focus +.two+.three+.move{
            left: 0;
        }
        .two:focus+.three+.move{                       
            left: -600px;
        }
        .three:focus+.move{
            left: -1200px;
        }

相关文章

  • day02(2017.9.21)

    轮播图

  • 2017.9.21

    热恋中的情侣,男动心,女动情。终究有别。

  • 2017.9.21

  • 2017.9.21

    今天周四了,明天过完就该休息了。从今年4月份以来公司变故开始,担惊受怕从未离开,那时候正值公司的艰难时期,创业期的...

  • 2017.9.21

    1.不低估他人的能力,不高估自己的能力。 2.坚持不懈,梦想成真。 3.性格是浑然天成的,不需要加以掩盖。发挥天性...

  • 2017.9.21

    我是这样理解的 世间之美分三种 一则 貌美 一则 心灵 三则 白富美 于美人而言,女孩子洁身自好,纯如碧玉为白 自...

  • 2017.9.21

    今日任务如下 做完增值税梦想成真选择题和综合题 财管资本成本课件复习 价值评估基础,资本成本梦想成真习题重做一遍

  • 2017.9.21

    抽象类带有纯虚函数的类称为抽象类,抽象类只能作为基类来使用。拷贝函数用一个已知对象构造一个新对象。

  • 2017.9.21

    抽象类 抽象类的一般形式 带有纯虚函数的类称为抽象类: class 类名 { virtual 类型 函数名(参数表...

  • 2017.9.21

    不是第一的我都不想要。 这样的你活得该有多累啊。

网友评论

      本文标题:day02(2017.9.21)

      本文链接:https://www.haomeiwen.com/subject/sdrzsxtx.html