font-weight:字体加粗
属性值:数字、单词
数字:100,200……700。
数字400正常属性,代码↓
<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
#one{
font-weight: 700;
}
#tow{
font-weight: 400;
}
</style>
</head>
<body>
<p id="one">文字加粗</p>
<p id="tow">文字正常属性</p>
</body>
</html>
View Code
两个单词:bold(加粗),normal(正常)
bold=700/normal=400
代码↓
<!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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Document</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
#one{
font-weight: bold;
}
#tow{
font-weight: normal;
}
</style>
</head>
<body>
<p id="one">文字加粗</p>
<p id="tow">文字正常属性</p>
</body>
</html>
View Code
效果图↓