font-weight:字体加粗
属性值:数字、单词
数字:100,200……700。
数字400正常属性,代码↓

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 3<head> 4 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5 <title>Document</title> 6 <style type="text/css"> 7 *{ 8 margin: 0; 9 padding: 0; 10 } 11 #one{ 12 font-weight: 700; 13 } 14 #tow{ 15 font-weight: 400; 16 } 17 </style> 18</head> 19<body> 20 <p id="one">文字加粗</p> 21 <p id="tow">文字正常属性</p> 22</body> 23</html>
View Code
两个单词:bold(加粗),normal(正常)
bold=700/normal=400
代码↓

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 3<head> 4 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5 <title>Document</title> 6 <style type="text/css"> 7 *{ 8 margin: 0; 9 padding: 0; 10 } 11 #one{ 12 font-weight: bold; 13 } 14 #tow{ 15 font-weight: normal; 16 } 17 </style> 18</head> 19<body> 20 <p id="one">文字加粗</p> 21 <p id="tow">文字正常属性</p> 22</body> 23</html>
View Code
效果图↓
