2013-02-04 5 views
0

2 비트의 텍스트가 있습니다. 하나는 단락 요소에 있고 다른 하나는 제출 버튼 입력 용 텍스트입니다.이 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 분명히

-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를 firefox 용으로 권장합니다. – bjedrzejewski

+0

버튼의 font-family Din Text Pro Regular도 있습니까? –

답변

0

, 크롬 어떤 종류의 버그로, 색상의 밝기에 따라 글꼴을 더 두껍게 표시합니다.

여기에 더 많은 정보를 원하시면 : https://code.google.com/p/chromium/issues/detail?id=163369

편집 : 찾을 수 많은 관련 정보와

를 해결 사실, 그것은이다 knownbug : 나는 this article에 따라이 문제를 해결할 수 있었다

.

다소 늦었지 만 일부 사용자에게는 여전히 유용 할 수 있습니다.

1

나는 이것을 내 CSS의 맨 위에 놓을 수있었습니다. 적어도 지금까지는이 트릭을 수행하는 것 같습니다 :

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