2013-02-04 85 views
0

我有兩位文字。一個是段落元素,另一個是提交按鈕輸入的文本。這個CSS在字體厚度方面有什麼不同?

enter image description here

enter image description here

爲什麼是字體的按鈕稍微厚?

enter image description here

第CSS(從計算樣式在Chrome開發者工具拍攝)

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開發者工具拍攝)

-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; 
+2

我相信按鈕在某些瀏覽器上默認爲粗體...嘗試應用font-weight:normal;到輸入。 – PlantTheIdea

+1

我的賭注是在文本陰影:rgba(24,97,81,0.34902)0px 1px 0px;你能發佈一個鏈接到這個頁面嗎?另外我建議firefox作爲類似問題的好工具。 – bjedrzejewski

+0

是否也是按鈕的字體系列Din Text Pro Regular? –

回答

1

我能夠把它放在我的CSS的頂部。至少到目前爲止,它似乎有訣竅:

button { 
-webkit-font-smoothing: antialiased; 
}