代碼如下:
<!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=gb2312" />
<title>border-style的outset屬性</title>
<style type="text/css">
.bevelmenu{ font: bold 13px arial; padding: 6px 0; margin: 0; width: 100%; background-color: #FFF2BF; text-align: left; /*將值設置為"right"菜單會向右靠攏*/ }
.bevelmenu li{ list-style: none; display: inline; }
.bevelmenu li a{ padding: 3px 0.5em; text-decoration: none; color: black; background-color: #FFF2BF; border: 2px solid #FFF2BF; }
.bevelmenu li a:hover{ color: black; background-color: #FFE271; border-style: outset; }
html>body .bevelmenu li a:active{ /* 鼠標按下的效果只有非IE浏覽器才支持 */ border-style: inset; } </style>
</head>
<BODY>
<ul class="bevelmenu"><li><a href="http://www.sina.com">新浪</a> </li><li><a href="http://www.163.com">網易</a> </li><li><a href="http://www.baidu.com">Baidu</a> </li><li><a href="http://www.yahoo.com">yahoo</a> </li><li><a href="http://www.google.com">Google</a> </li></ul>
</BODY>
</html>
如果用inset屬性就有種凹陷的感覺,與outset屬性正好相反!
<!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=gb2312" />
<title>border-style的outset屬性</title>
<style type="text/css">
.bevelmenu{ font: bold 13px arial; padding: 6px 0; margin: 0; width: 100%; background-color: #FFF2BF; text-align: left; /*將值設置為"right"菜單會向右靠攏*/ }
.bevelmenu li{ list-style: none; display: inline; }
.bevelmenu li a{ padding: 3px 0.5em; text-decoration: none; color: black; background-color: #FFF2BF; border: 2px solid #FFF2BF; }
.bevelmenu li a:hover{ color: black; background-color: #FFE271; border-style: outset; }
html>body .bevelmenu li a:active{ /* 鼠標按下的效果只有非IE浏覽器才支持 */ border-style: inset; } </style>
</head>
<BODY>
<ul class="bevelmenu"><li><a href="http://www.sina.com">新浪</a> </li><li><a href="http://www.163.com">網易</a> </li><li><a href="http://www.baidu.com">Baidu</a> </li><li><a href="http://www.yahoo.com">yahoo</a> </l