码迷,mamicode.com
首页 > Web开发 > 详细

css滑动门原理

时间:2020-03-24 15:59:22      阅读:105      评论:0      收藏:0      [点我收藏+]

标签:doctype   oct   lin   enter   hover   ack   背景   splay   col   

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style type="text/css">
  * {
    margin: 0;
    padding: 0;
    }
  ul {
    list-style: none;
   }
  body {
    background: url(images/wx.jpg) repeat-x;
  }
  .nav {
    height: 75px;
  }
  .nav li {
    float: left;
    margin: 0 10px;
    padding-top: 21px;
  }
  .nav li a {
    display: block;
    background: url(images/to.png) no-repeat;
    color: #fff;
    font-size: 14px;
    line-height: 33px;
    padding-left: 15px;
    text-decoration: none;
  }
  .nav li a:hover {
    background-image: url(images/ao.png);
  }

  .nav li a:hover span { /* 鼠标经过a a里面的span 也要变换背景 */
    background-image: url(images/ao.png);
  }
  .nav li a span {
    display: block;
    line-height: 33px;
    background: url(images/to.png) no-repeat right center;
    padding-right: 15px;
  }
</style>
</head>
<body>
  <div class="nav">
  <ul>
    <li>
      <a href="#">
      <span>首页</span>
      </a>
    </li>
    <li>
      <a href="#">
      <span>帮助与反馈</span>
      </a>
    </li>
    <li>
      <a href="#">
      <span>公众平台</span>
      </a>
    </li>
    <li>
      <a href="#">
      <span>帮助与反馈</span>
      </a>
    </li>
    <li>
      <a href="#">
      <span>帮助与反馈</span>
      </a>
    </li>
  </ul>
  </div>
</body>
</html>

css滑动门原理

标签:doctype   oct   lin   enter   hover   ack   背景   splay   col   

原文地址:https://www.cnblogs.com/pxxdbk/p/12559225.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!