font的使用
来源:2-16 编程练习
海波_
2021-05-26 18:23:08
<!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>
p:first-child {
color: red;
font: italic bold;
}
p:last-child {
color: blue;
font-weight: bold;
}
</style>
</head>
<body>
<p>Web前端攻城狮(Web front siege lion)</p>
<p>CSS层叠样式表(Cascading Style Sheets)</p>
</body>
</html>
老师第一行文字的 倾斜加粗为什么实现不了呢
1回答
同学你好,因为font简写中必须有字体大小以及字体系列才可以,否则不生效,建议修改:
祝学习愉快~
相似问题