返回弹性盒子的示例...登陆

弹性盒子的示例

世界的背影2019-01-18 15:45:19336

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

38

39

40

41

42

43

44

45

46

<!DOCTYPE html>

<html>

  <head>

    <meta charset="utf-8">

    <style>

    .flex {

        /* basic styling */

        width: 350px;

        height: 200px;

        border: 1px solid #555;

        font: 14px Arial;

 

        /* flexbox setup */

        display: flex;

        flex-direction: row;

    }

 

    .flex > div {

        flex: 1 1 auto;

        width: 30px; /* To make the transition work nicely. (Transitions to/from

                        "width:auto" are buggy in Gecko and Webkit, at least.

                        See http://bugzil.la/731886 for more info.) */

        transition: width 0.7s ease-out;

    }

 

    /* colors */

    .flex > div:nth-child(1){ background: #009246; }

    .flex > div:nth-child(2){ background: #F1F2F1; }

    .flex > div:nth-child(3){ background: #CE2B37; }

 

    .flex > div:hover {

        width: 200px;

    }

    

    </style

  </head>

  <body>

    <p>Flexbox nuovo</p>

    <div>

      <div>uno</div>

      <div>due</div>

      <div>tre</div>

    </div>

  </body>

</html>

弹性盒子


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送