• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

3D导航栏

武飞扬头像
柠檬味的少女
帮助1

  1.  
    <style>
  2.  
    *{
  3.  
    margin: 0;
  4.  
    padding: 0;
  5.  
    }
  6.  
    ul{
  7.  
    list-style: none;
  8.  
    width: 300px;
  9.  
    height: 40px;
  10.  
    /* background-color: pink; */
  11.  
    margin: 50px auto;
  12.  
     
  13.  
    perspective: 1000px;
  14.  
     
  15.  
     
  16.  
    }
  17.  
    li{
  18.  
    position: relative;
  19.  
    float: left;
  20.  
    width: 100px;
  21.  
    height: 40px;
  22.  
    /* background-color: aqua; */
  23.  
    /* 开启3D空间 */
  24.  
    transform-style: preserve-3d;
  25.  
    /* 过渡效果 */
  26.  
    transition: all 1.5s;
  27.  
    /* 侧过来方便观察 */
  28.  
    /* transform: rotateY(41deg) rotateX(342deg); */
  29.  
    }
  30.  
    a{
  31.  
    position: absolute;
  32.  
    top: 0;
  33.  
    left: 0;
  34.  
    display: block;
  35.  
    text-decoration: none;
  36.  
    text-align: center;
  37.  
    line-height: 40px;
  38.  
    width: 100px;
  39.  
    height: 40px;
  40.  
    color: white;
  41.  
    }
  42.  
    .front{
  43.  
    background-color: green;
  44.  
    transform: translateZ(20px);
  45.  
     
  46.  
     
  47.  
    }
  48.  
    .top{
  49.  
    background-color: orange;
  50.  
    transform:translateY(-20px) rotateX(90deg);
  51.  
    }
  52.  
    ul li:hover{
  53.  
    transform: rotateX(-90deg);
  54.  
    }
  55.  
    </style>
  56.  
    <body>
  57.  
    <ul>
  58.  
    <li>
  59.  
    <a href="#" class="front">首页</a>
  60.  
    <a href="#" class="top">Index</a>
  61.  
    </li>
  62.  
    <li>
  63.  
    <a href="#" class="front">登录</a>
  64.  
    <a href="#" class="top">Login</a>
  65.  
    </li>
  66.  
    <li>
  67.  
    <a href="#" class="front">注册</a>
  68.  
    <a href="#" class="top">Register</a>
  69.  
    </li>
  70.  
    </ul>
  71.  
    </body>
学新通

效果样式

学新通

思路学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgbeikf
系列文章
更多 icon
同类精品
更多 icon
继续加载