font-weight: normal; /*普通字体*/ font-weight: bold; /*粗体*/ font-weight: bolder; /*更粗的字体*/ font-weight: lighter; /*更细的字体*/ font-weight: 100; /*非常细的字体*/ font-weight: 200; /*极细的字体*/ font-weight: 300; /*细的字体*/ font-weight: 400; /*普通字体*/ font-weight: 500; /*半粗体*/ font-weight: 600; /*粗体*/ font-weight: 700; /*特粗体*/ font-weight: 800; /*更特粗的字体*/ font-weight: 900; /*最特粗的字体*/
这些字体粗细值可以应用到CSS中的任何字体样式属性中,例如font-family、font-style、font-size等属性:
font-family: Arial, sans-serif; font-style: italic; font-size: 20px; font-weight: bold;
在这个例子中,字体是Arial,样式是斜体,大小是20像素,粗细是粗体。
使用这些字体粗细值可以让大家在网页设计中更加自由,使得字体的呈现方式更加个性化。通过合理的应用字体粗细值,可以让页面看起来更加美观、有条理。