CSS——字体属性

来源:互联网 发布:易观智库 数据来源 编辑:程序博客网 时间:2024/05/21 10:36

字体属性比较多,就不多列举,需要的时候可以查技术手册;

主要介绍几个常见的;

font    它是个复合属性。严格按照文档的顺序填写相应的格式font-family  规定文本的字体font-size   字体的大小   font-weight 字体的粗细font-style  字体的样式font-variant    是否以小型大写字母的字体显示文本
<html><head>    <title>CSS选择器5</title>    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">    <meta http-equiv="description" content="this is my page">    <meta http-equiv="content-type" content="text/html;charset=utf-8"><!-- -->    <style type="text/css">    /*p{        font-family:黑体;        font-size:25px;        font-weight:900;        font-style:oblique;        font-variant:small-caps;    }*/        p{            font:oblique small-caps 900 25px 黑体;        }    </style></head> <body>    <p >窗前明月光,疑是地上霜!hello my love!</a><br/></body></html>
0 0
原创粉丝点击