百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>CSS教程> CSS实现3D切换功能的代码示例
分享文章到:

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

发布时间:09/01 来源:未知 浏览: 关键词:
本篇文章给大家带来的内容是关于CSS实现3D切换功效的代码示例,有必然的参照 价值,有需要的伴侣可以参照 一下,但愿对你有所帮忙。

<!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切换功效的代码示例的具体内容,更多请关注百分百源码网其它相关文章!

打赏

打赏

取消

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

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

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

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有151人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板