例子:
.yangshi1{ font-weight:bold}
.yangshi2{ font-weight:600}
font-weight对象值:从100到900,最常用font-weight的值为bold
font-weight参数:
normal : 正常的字体。相当于number为400。声明此值将取消之前任何设置
bold : 粗体。相当于number为700。也相当于b对象的作用
bolder : IE5+ 特粗体
lighter : IE5+ 细体
number : IE5+ 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
<!DOCTYPE html><html>
<head>
<meta charset="utf-8" />
<title>test</title>
<style type="text/css">
ul.titlemenu {
margin: 0
padding: 0
}
li.titlemenu {
list-style-type: none
text-align: center
border-bottom: 1px #fff solid
}
a {
font-weight: bolder
font-size: 14px
}
a.titlemenu:link,a.titlemenu:visited,a.titlemenu:active {
display: block
color: #000
background-color: #fff
text-decoration: none
line-height: 50px
padding-left: 14px
}
a.titlemenu:hover {
color: #fff
text-decoration: none
background-color: #3fa200
line-height: 50px
padding-left: 14px
}
</style>
<!-- <script type="text/javascript" src="../jquery-1.8.0.min.js"></script> -->
</head>
<body>
<ul class="titlemenu">
<li class="titlemenu"><a class="titlemenu">abc123你</a>
</li>
</ul>
</body>
</html>