recherche

Maison  >  Questions et réponses  >  le corps du texte

javascript - 竖向的全屏切换效果怎么实现?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

<code><style>

        *{

            margin: 0;

            padding: 0;

        }

        html,body{

            height: 100%;

        }

        #banner {

            height: 100%;

            overflow: hidden;

        }

        .section{

            height: 100%;

        }

        .section1{

            background: aquamarine;

        }

        .section2{

            background: #990000;

        }

        .section3{

            background: chartreuse;

        }

        .section4{

            background: cadetblue;

        }

        .section5{

            background: darkolivegreen;

        }

        .btn{

            position: absolute;

            top: 500px;

            left: 100px;

        }

    </style>

</code>

1

2

3

4

5

6

7

8

9

<code><p id="banner">

        <p class="section section1"></p>

        <p class="section section2"></p>

        <p class="section section3"></p>

        <p class="section section4"></p>

        <p class="section section5"></p>

        <input class="btn" type="button" value="下一页"/>

    </p>

</code>

想实现竖向的全屏切换,点击下一页的时候切换到下一个section,该怎么实现?求个思路

怪我咯怪我咯2904 Il y a quelques jours368

répondre à tous(3)je répondrai

  • PHPz

    PHPz2017-04-10 15:12:38

    swiper 中文网

    Swiper常用于移动端网站的内容触摸滑动

    répondre
    0
  • PHP中文网

    PHP中文网2017-04-10 15:12:38

    1

    2

    3

    4

    5

    6

    7

    8

    <code>#banner{

        height:100%;

        overflow:hidden;

    }

    .section{

        height:100%;

     }

    </code>

    移动banner的垂直位置实现section的切换

    全屏滚动

    répondre
    0
  • 巴扎黑

    巴扎黑2017-04-10 15:12:38

    swiper和onepage-scroll都可以

    répondre
    0
  • Annulerrépondre