CSS实现3D切换功能的代码示例


本文摘自PHP中文网,作者不言,侵删。

本篇文章给大家带来的内容是关于CSS实现3D切换功能的代码示例,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。

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

<!DOCTYPE html>

<html>

<head>

    <title>Demo</title>

  <style>

       #app{

           width: 100px;

           height: 35px;

           background-color: #006600;

           text-align: center;

           line-height: 35px;

           position: relative;

           transform-style: preserve-3d;

           transition: all 0.3s linear;

       }

       #app:hover{

           transform: rotateX(90deg);

           transition: all 0.3s linear;

           -webkit-transform-origin: 50% 0;

       }

       #app:before{

           position: absolute;

           top: 100%;

           left: 0;

           content: attr(data-hover);

           width: 100px;

           height: 35px;

           transform: rotateX(-90deg);

           transition: all 0.3s linear;

           transform-origin: 50% 0;

           text-align: center;

           line-height: 35px;

            background-color: red;

       }

    </style>

  

<div>

    <div id="app" data-hover="asdasdasd">

        asdasdasd

    </div>

</div>

</body>

</html>

【相关推荐:CSS视频教程】

以上就是CSS实现3D切换功能的代码示例的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

css vertical-align属性怎么用

ie css背景图片不显示怎么办

css calc()有啥用

手把手教你使用css给html字体添加边框效果(代码分享)

chrome css加载不出来怎么办

aspx怎么引入css

css a不换行怎么设置

css input怎么去掉边框

css hr是什么意思

详解css z-index的权重问题

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...