Home > Web Front-end > CSS Tutorial > Example of setting text attributes in css

Example of setting text attributes in css

黄舟
Release: 2016-12-28 16:15:16
Original
1780 people have browsed it

css part

<style>
        pre {
            color: red;
            background-color: cornsilk;
            /*文字大小*/
            font-size: 18px;
            /*文字 字体,个别字体 在不同的系统中不支持,设置多个字体实现多系统兼容*/
            font-family: Aharoni, Andalus, "Angsana New";
            /*文字 粗细,100-900的100整数倍,normal(400),bold(700)*/
            font-weight: 900;
            /*字体的风格 normal正常,inherit浏览器文字倾斜显示,oblique使文字倾斜*/
            font-style: inherit;
            /*字符之间的 距离*/
            letter-spacing: 5px;
            /*英文 字符之间的距离,如果中文之间 有空格 也会对 空格起作用*/
            word-spacing: 7px;
        }

        ul li {
            /*font: 样式style 粗细 尺寸 字体类型;*/

        }
    </style>
Copy after login

boday part

<body>
<pre class="brush:php;toolbar:false">
    今天是2016年6月17日,北京,天气晴

  • 设置字体大小:20px
  • 设置字体加粗x
  • 设置字体倾斜显示
  • 设置字体类型
Copy after login

The above is the content of the example of setting text attributes in css. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!


##

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template