返回漂亮的jQue......登陆

漂亮的jQuery左边划出导航

天腾²⁰¹⁹2019-05-26 14:38:04191
<!DOCTYPE html>
<html>
<head>
<title>jQuery左边滑出导航</title>
<meta charset="UTF-8">
<link rel="stylesheet"  type="text/css" charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="static/font-awesome/css/font-awesome.min.css">
<script type="text/javascript" src="static/js/jquery.js"></script>
<style>
*{margin: 0px;padding: 0px;}
ul{list-style: none; position: fixed;top: 10px;left: 0px;}
#nav li{width: 80px;height: 80px;margin: 10px 0px;border-top-right-radius:10px;border-bottom-right-radius: 10px;line-height: 80px;text-align: center; }
.li1{background: #361F7B;}
.li2{background: red;}
.li3{background: yellow;}
.li4{background: #25118B;}
.li5{background: greenyellow;}
#nav li span{font-weight: 700;font-size: 30px;color: #fff;}
</style>
<script type="text/javascript">
    $(function(){
        $('#nav li').stop().animate({'marginLeft':'-65px'},1000)
        $('li').hover(
            function(){
                $(this).stop().animate({'marginLeft':'-2px'},500)
            },
function(){
                $(this).stop().animate({'marginLeft':'-65px'},500)
            }
            )
    })
</script>

</head>
<body>
<ul id="nav">
  <li class="li1"><span class="fa fa-tags"></span></li>
  <li class="li2"><span class="fa fa-address-card"></span></li>
  <li class="li3"><span class="fa fa-grav"></span></li>
  <li class="li4"><span class="fa fa-user-o"></span></li>
  <li class="li5"><span class="fa fa-handshake-o"></span></li>
</ul>
</body>
</html>


最新手记推荐

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

全部回复(0)我要回复

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