How to set bold style in css

王林
Release: 2020-11-16 16:50:18
Original
3824 people have browsed it

css设置黑体样式的方法:可以利用font-family属性来进行设置,如【font-family: 黑体;】。font-family属性用于指定一个元素的字体。

How to set bold style in css

属性介绍:

font - family属性指定一个元素的字体。

(学习视频分享:css视频教程

有两种类型的字体系列名称:

  • family-name - 指定的系列名称:具体字体的名称,比如:"times"、"courier"、"arial"。

  • generic-family - 通常字体系列名称:比如:"serif"、"sans-serif"、"cursive"、"fantasy"、"monospace。

提示:使用某种特定的字体系列(Geneva)完全取决于用户机器上该字体系列是否可用;这个属性没有指示任何字体下载。因此,强烈推荐使用一个通用字体系列名作为后路。

属性值:

  • family-name\generic-family 用于某个元素的字体族名称或/及类族名称的一个优先表。默认值:取决于浏览器。

  • inherit 规定应该从父元素继承字体系列。

举例:

     
  

测试黑体

普通字体

测试黑体

Copy after login

相关推荐:CSS教程

The above is the detailed content of How to set bold style in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!