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;
}
效果图:
本文详细介绍了如何使用CSS来设置文本样式,包括字体大小、字体系列等属性,并通过实例展示了如何定义字体文件并在段落中应用自定义字体。
2046

被折叠的 条评论
为什么被折叠?



