Home  >  Article  >  Web Front-end  >  Detailed introduction to CSS basic style fonts

Detailed introduction to CSS basic style fonts

高洛峰
高洛峰Original
2017-03-26 11:36:111442browse

1. CSS font properties define the font family, size, boldness, style and transformation of the text

2. Properties

font-family Set the font family

font-size Set font size

font-style Set font style

font-variant Display text in small caps or normal font

font-weight Set the thickness of the font

p{
    font-size: 30px;
    font-family: monospace;
}

Fonts have been greatly improved after CSS3. In the past, some safe fonts had to be used to ensure that this font must exist on the user's PC. In Css3 Don't worry about this anymore.

@font-face{
    font-family:myfont;
    src:url();
}

The above is the detailed content of Detailed introduction to CSS basic style fonts. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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