css设置文字属性的示例

css部分

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

boday部分

<body>
<pre>
    今天是2016年6月17日,北京,天气晴
</pre>
<hr>
<ul>
    <li>设置字体大小:20px</li>
    <li>设置字体加粗x</li>
    <li>设置字体倾斜显示</li>
    <li>设置字体类型</li>
</ul>
</body>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值