css - 不能将 font-style=italic 与 font-weight 结合使用
问题描述
我不是 css 专家,我在跨浏览器行为方面遇到了一些麻烦。在 Google Chrome 中,我的代码运行良好。在我尝试过的其他浏览器(Mozilla、Edge、IE)中没有;特别是在使用这些最后的浏览器时,font-style 属性似乎排除了 font-weight 属性
这是我的 html 和 css 代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<style>
.non-italic-class{
font-size: 25px;
font-weight: 900;
font-family: "futura-pt", sans-serif;
}
.italic-class{
font-style: italic;
}
</style>
</head>
<body>
<span class="non-italic-class">NON ITALIC</span>
<br>
<span class="non-italic-class italic-class">ITALIC</span>
</body>
</html>
这是它在 Chrome 中的样子(对我来说很好):
这是它在 Mozilla、Edge、IE 中的样子(对我来说是错误的):
难道我做错了什么?我是否需要添加一些代码才能在所有这些浏览器中获得相同的行为?
解决方案
推荐阅读
- flutter - 如何在 CachedNetworkImage() 上应用 Ink.image()?
- r - 一个变量有多少个观测值缺失?
- django - Wagtail:通过子字段过滤页面模型
- python - 如何读取只有一列的一些行的html?
- devexpress - Devexpress xaf 多对多关系 oid 键名称更改
- c# - 如何在 MS SQL 中插入标识列
- python - 如何使用列表推导中创建的列表来附加另一个推导的数据?
- python - 是否可以在 spaCy 的实体链接候选生成中使用 NER-Label?
- python - 获取另一个列表中包含的列表中第一个元素的索引?
- phpmyadmin - MAMPPRO 禁止访问 phpmyadmin