html - 如果这两种样式具有相同的 css 属性,为什么它们呈现不同?

标签 html css fonts

<分区>

您可以看到现场演示 here .

问题如下,h3title-azul mas-grande:

h3{
    color:#109de9;
    font-size:28px;
    margin-bottom:15px;
    margin-top:15px;
}

.title-azul{
    color:#109de9;
    font-size:20px;
    margin-bottom:6px;
}

.mas-grande{
    font-size:28px;
    margin-bottom:15px;
    margin-top:15px;
}

据我所知,它应该呈现相同,但 title-azul mas-grande 呈现得更小:

enter image description here

当我检查 chrome 中的元素时,计算的样式完全相同,除了 font-weight: normal; 没有出现在 title-azul mas-grande 类中:

-webkit-border-image: none;
border-bottom-color: rgb(16, 157, 233);
border-bottom-style: none;
border-bottom-width: 0px;
border-left-color: rgb(16, 157, 233);
border-left-style: none;
border-left-width: 0px;
border-right-color: rgb(16, 157, 233);
border-right-style: none;
border-right-width: 0px;
border-top-color: rgb(16, 157, 233);
border-top-style: none;
border-top-width: 0px;
color: rgb(16, 157, 233);
display: block;
font-family: omnes;
font-size: 28px;
font-weight: normal; #This does not appear when I inspect the div with the class title-azul mas-grande
height: 28px;
line-height: 28px;
margin-bottom: 15px;
margin-left: 0px;
margin-right: 0px;
margin-top: 15px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
vertical-align: baseline;
width: 750px;

这很奇怪,因为所需的字体粗细实际上正常,但这是我能找到的唯一明显的区别。

你能指出问题出在哪里吗?

最佳答案

我认为这只是一种光学效应。我更改了标题文本,它们呈现相同。 (efecto óptico ;))

关于html - 如果这两种样式具有相同的 css 属性,为什么它们呈现不同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15097218/

上一篇:Javascript 样式切换不起作用第一次单击

下一篇:css - 如何防止所选选项卡的导航栏中出现 Blob 边框

相关文章:

CSS3 漩涡渐变

html - 在 div 中水平和垂直居中按钮

javascript - 按钮未在固定位置 DIV 内单击?

javascript - 如何在 HTML 文本区域中启用非英文字符的输入?

html - Google 字体 API 库或 FontFace

html - 使用 2 个 SVG 图标应用类似的填充效果

css - 基于窗口宽度的div垂直位置

java - 如何过滤 JSoup 中嵌套标签中的噪音? java

javascript - 移动网站在手机上太慢

ios - 我的字体大小不适用于我的自定义字体