这样我们就能获得更漂亮的回复窗口:
2)导航状态
我们也可以通过border创造的三角形来实现:
标签一标签二标签三标签四
HTML代码:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>标示导航状态</title>
<style type="text/css">
#nav_state{height:20px;}
#nav_state a{width:80px;display:block;text-align:center;padding:2px;line-height:18px;;float:left;background-color:#ccc;margin-right:5px;color:#333;position:relative;text-decoration:none;font-size:12px;}
#nav_state a span{display:none;}
#nav_state a.current,#nav_state a:hover{background-color:#000;color:#fff;}
#nav_state a.current span,#nav_state a:hover span{display:block;width:0;height:0;border-width:8px;border-style:solid;border-color:#000 transparent transparent;position:absolute;top:20px;left:32px;overflow:hidden; }
</style>
</head>
<body>
<div id="nav_state">
<a href="#" charset="current">标签一<span></span></a> <a href="#">标签二<span></span></a> <a href="#">标签三<span></span></a> <a href="#">标签四<span></span></a>
</div>
</body>
</html>
|
|