简述: 今天在Hbuilder X中font属性不能连写问题,实在惭愧,也怪我CSS写得太少了,记录下来。
<style>
div {
/* font-style: italic;/* 设置字体样式 */ */
/* font-size: 20px;/* 设置字体大小 */ */
/* font-weight: 700;/* 设置字体粗细 */ */
/* font-family: '仿宋';/* 设置字体 */ */
/* font: font-style font-weight font-size/line-height font-family; */
font:bold 240px "arial narrow";
}
</style>
<body>
<div>哈啤酒</div>
</body>
把font属性代码,前多余的注释删除即可。