我有这个例子:
body {
font-family: 'Roboto', sans-serif;
font-size: 15px;
}
div {
background: gray;
font-size: 1rem;
color: #fff;
padding: 0.25rem 1.5rem;
}
div:nth-of-type(2) {
font-family: "Open Sans";
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700&subset=cyrillic" rel="stylesheet">
</head>
<body>
<div>
Add new Shop
</div>
<br>
<div>
Add new Shop
</div>
</body>
</html>
在此示例中,Add New Shop
文字不是中间文字。如果我在“ Open Sans”上更改字体,那么一切都很好。在窗户上一切都很好。我该如何解决?