书写顺序:(font-style与font-weight可以互换 )
font: font-style font-weight font-size/line-height font-family;
font-size与font-family为必写属性,例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css文本属性简写</title>
<style type="text/css">
.demo{
font: italic 700 20px/50px 宋体;
}
</style>
</head>
<body>
<div class="demo">
哈哈
</div>
</body>
</html>