index.html
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <title>CSS文本样式[上]</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <p>这是html5</p> </body> </html>
style.css
@charset "utf-8"; body { /*font-size: 50px;*/ /*font-variant: small-caps;*/ } @font-face { font-family: 'abc'; src: url('BrushScriptStd.otf'); } p { font-size: 50px; /*font-size: xx-small;*/ /*font-size: xx-large;*/ /*font-size: smaller;*/ /*font-size: larger;*/ /*font-variant: small-caps;*/ /*font-variant: normal;*/ /*font-style: italic;*/ /*font-style: oblique;*/ /*font-weight: bold;*/ /*font-weight: bolder;*/ /*font-weight: lighter;*/ /*font-weight: 600;*/ /*font-family: 微软雅黑;*/ /*font-family: 楷体1,微软雅黑1,宋体;*/ /*font: small-caps italic bold 50px 楷体 ;*/ font-family: abc; }
效果图: