0

我有两段文字。一个是段落元素,另一个是提交按钮输入的文本。

在此处输入图像描述

在此处输入图像描述

为什么按钮中的字体略粗?

在此处输入图像描述

段落 CSS(取自 Chrome 开发者工具中的 Computed Style)

box-sizing: border-box;
color: rgb(255, 255, 255);
display: block;
float: left;
font-family: 'Din Text Pro Regular', Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
font-weight: normal;
height: 24px;
line-height: 24px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 16px;
margin-top: 11.199999809265137px;
width: 119px;

输入 CSS(取自 Chrome 开发者工具中的 Computed Style)

-webkit-appearance: none;
-webkit-border-image: none;
-webkit-box-align: center;
-webkit-box-shadow: rgba(0, 0, 0, 0.65098) 0px 1px 3px 0px, rgba(97, 232, 203, 0.701961) 0px 1px 0px 0px inset;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
-webkit-writing-mode: horizontal-tb;
background-color: rgb(192, 192, 192);
background-image: -webkit-linear-gradient(top, rgb(75, 208, 179), rgb(38, 174, 144));
border-bottom-color: rgb(255, 255, 255);
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-style: none;
border-bottom-width: 0px;
border-left-color: rgb(255, 255, 255);
border-left-style: none;
border-left-width: 0px;
border-right-color: rgb(255, 255, 255);
border-right-style: none;
border-right-width: 0px;
border-top-color: rgb(255, 255, 255);
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-top-style: none;
border-top-width: 0px;
box-shadow: rgba(0, 0, 0, 0.65098) 0px 1px 3px 0px, rgba(97, 232, 203, 0.701961) 0px 1px 0px 0px inset;
box-sizing: border-box;
color: rgb(255, 255, 255);
cursor: pointer;
display: inline-block;
font-family: 'Din Text Pro Regular', Arial, Helvetica, sans-serif;
font-size: 16px;
height: 41px;
letter-spacing: normal;
line-height: 16px;
margin-bottom: 0px;
margin-left: 10px;
margin-right: 0px;
margin-top: 0px;
padding-bottom: 10px;
padding-left: 20px;
padding-right: 20px;
padding-top: 11px;
text-align: center;
text-indent: 0px;
text-shadow: rgba(24, 97, 81, 0.34902) 0px 1px 0px;
text-transform: none;
vertical-align: baseline;
white-space: pre;
width: 159px;
word-spacing: 0px;
writing-mode: lr-tb;
4

2 回答 2

1

我能够把它放在我的 CSS 的顶部。至少到目前为止,它似乎起到了作用:

button {
-webkit-font-smoothing: antialiased;
}
于 2014-11-24T20:33:32.960 回答
0

显然,Chrome 是某种错误,它会根据颜色的亮度显示更粗的字体。

更多信息在这里:https ://code.google.com/p/chromium/issues/detail?id=163369

编辑:找到更多相关信息并修复

实际上,这是一个已知的 错误

我能够通过遵循这篇文章来解决这个问题。

有点晚了,但它可能对某些人仍然有用。

于 2014-01-14T01:59:25.937 回答