码迷,mamicode.com
首页 > 其他好文 > 详细

导航中的中英文切换

时间:2017-02-02 15:31:45      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:src   img   1.0   bsp   normal   学习   weight   animate   w3c   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>中英切换导航条</title>

<style type="text/css">

*{padding:0; margin:0;}

li{ list-style:none; }

a{ text-decoration:none;}

.nav{ width:100%; height:40px; background:#222; margin-top:100px; overflow:hidden;}

.list{ width:1000px; height:40px; margin:0 auto;}

.list li{ float:left;}

.list li a{ display:block;}

 

.list b,.list i{ display:block; padding:0 30px; color:#aaa; line-height:40px; text-align:center;}

.list b{ font-weight:100}

.list i{ font-style:normal; background:#333; color:#fff;}

</style>

<script type="text/javascript" src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>

<script type="text/javascript">

    $(function(){

    $(".list a").hover(function(){

        $(this).stop().animate({"margin-top":-40},300)

    },function(){

        $(this).stop().animate({"margin-top":0},300)

    }) 

})

</script>

</head>

 

<body>

 

<div class="nav">

         <ul class="list">

             <li>

                 <a href="#">

                     <b>Index</b>

                <i>首页</i>

            </a>

        </li>

       

       

        <li>

                 <a href="#">

                     <b>course</b>

                <i>职业课程</i>

            </a>

        </li>

       

       

        <li>

                 <a href="#">

                     <b>study</b>

                <i>就业学习</i>

            </a>

        </li>

       

       

        <li>

                 <a href="#">

                     <b>BBS</b>

                <i>极客社区</i>

            </a>

        </li>

       

       

        <li>

                 <a href="#">

                     <b>JiKe+</b>

                <i>极客+</i>

            </a>

        </li>

    </ul>

</div>

 

 

</body>

</html>

需要web前端课程工具和电子书,可以加群120342833,或者扫码

 技术分享

导航中的中英文切换

标签:src   img   1.0   bsp   normal   学习   weight   animate   w3c   

原文地址:http://www.cnblogs.com/ZZZAB/p/6361207.html

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