4.7文本属性

90 阅读1分钟
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
	<style>
		/* 放在style标签第一行 */
		@font-face{font-family:'ZoomlaFangZhuan-A054'; /*逐浪方篆体*/
    src: url('https://code.z01.com/font/ZoomlaFangZhuan-A054.eot?#iefix'); /* IE9 */
    src: url('https://code.z01.com/font/ZoomlaFangZhuan-A054.eot?#iefix') format("embedded-opentype"), /* IE6-IE8 */
    url('https://code.z01.com/font/ZoomlaFangZhuan-A054.woff') format("woff"), /* chrome、firefox */
    url('https://code.z01.com/font/ZoomlaFangZhuan-A054.ttf') format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */
    url('https://code.z01.com/font/ZoomlaFangZhuan-A054.svg#ZoomlaFangZhuan-A054') format("svg"); /* iOS 4.1- */
    font-style: normal; font-weight: normal;}
		div{
			/* 打开或者关闭斜体 font-style fs italic开启斜体 normal默认值  */
			font-style: italic;
			/* 设置文本加粗 font-weight fw 100-900 bold bolder */
			font-weight: bold;
			/* 设置字体大小 font-size fs */
			font-size: 28px;
			font-family:'楷体','宋体',serif;
			/* 设置字体类型 font-family ff 第一个字体生效 第一个电脑中依次后推 */
			/* font-family:'ZoomlaFangZhuan-A054'; */
			/* 设置网络字体webfont  */
			/* 简写形式 font:style weight size family  style wegith可以省略 其他不可以 */
			/* font: normal bold 26px "微软雅黑"; */
		}
	</style>
</head>
<body>
	<div>我是一个div</div>
</body>
</html>