<!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>
</head>
<style>
body {
/* 字体大小12px,行高是字体的1.2倍 */
/* 字体大小15px,行高是字体的1.5倍 */
/* 这样字会垂直居中 */
font: 15px/1.5;
}
.box {
background-color: orange;
color: #fff;
}
</style>
<body>
<div class="box">你好</div>
</body>
</html>
css font: 15px/1.5含义
最新推荐文章于 2024-01-06 18:35:00 发布