一个小的程序--实现中英文切换(纯css)

时间:2022-02-14 09:34:01

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<title>Document</title>
</head>
<style>
*{padding:0;margin:0px;}
li{list-style:none;}
a{text-decoration:none;}
.nav{width:100%;height:40px;margin-top:100px;overflow:hidden;}
.list{width:1000px;height:40px;border:1px solid red;margin:0 auto;}
.list li{float:left;}
.list li a{border:1px solid red;display:block;transition:0.3s;}
.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;}
.list a:hover{margin-top:-40px;}
</style>
<body>
<div class="nav">
<ul class="list">
<li>
<a href="#">
<b>qiuchunxia</b>
<i>导航</i>
</a></li>

<li>
<a href="#">
<b>qiuchunxia</b>
<i>导航</i>
</a></li>

<li>
<a href="#">
<b>qiuchunxia</b>
<i>导航</i>
</a></li>

<li>
<a href="#">
<b>qiuchunxia</b>
<i>导航</i>
</a></li>

<li>
<a href="#">
<b>qiuchunxia</b>
<i>导航</i>
</a></li>
</ul>
</div>
</body>
</html>