2014-12-31 2 views
3

나는 모든 브라우저에서 같은 크기로 볼 필요가있는 텍스트가있는 곳에서 작업하고있는 사이트가 있습니다. 나는 아래 사진에서 폰트 크기로 1.6em을 사용하고있다. 문제는 IE 11에서 글꼴이 Chrome/FF/Safari에서보다 더 크게 나타나는 것입니다. 나는 내가 생각할 수있는 모든 글꼴 크기 조정 옵션을 시도했다. px, vh, vw, vmin, %하지만 IE 11에서는 여전히 다른 모든 브라우저보다 더 크게 렌더링됩니다. 누구든지 이것에 대해 좋은 해결책을 알고 있습니까?다른 브라우저보다 IE 11에서 폰트 크기가 다름

차이가 있는지는 모르겠지만 일반 글꼴 대신 Google 글꼴을 사용하고 있는지 확실하지 않습니다.

<div class="banner-wrap"> 
    <div> 
      <h1>Where Compassion Lives</h1> 
    </div> 
    <img class="banner" src="assets/images/banner_title_home.png"> 
    <img class="greg" src="assets/images/greg-transparent.png"> 
</div> 

내 CSS :

.banner-wrap { 
    position: relative; 
    width: 100%; 
    max-width: 796px; 
    margin-top: 0px; 
    margin-right: auto; 
    margin-bottom: 0px; 
    margin-left: auto; 
} 
.banner-wrap div { 
    font-size: 1.6em; 
    position: absolute; 
    bottom: 59px; 
    left: 0px; 
    width: 100%; 
    height: auto; 
    z-index: 40; 
    font-family: 'Kaushan Script', cursive; 
    color: #FFF; 
    letter-spacing: 0.2em; 
    opacity: 0.9; 
    text-align: center; 
    text-shadow: 1px 1px 1px #999; 
} 
.banner-wrap img.banner { 
    position: absolute; 
    bottom: 59px; 
    left: 0px; 
    width: 100%; 
    height: auto; 
    z-index: 30; 
} 
.banner-wrap img.greg { 
    position: absolute; 
    bottom: 30px; 
    right: -50px; 
    width: 19vmin; 
    max-width:180px; 
    height: auto; 
    z-index: 40; 
} 
크롬에서

샘플 11 enter image description here

내 HTML IE에서 enter image description here

샘플 (이 보이게하는 방법입니다)

+0

이 게시물에서 해결책을 찾은 것 같습니다. http://stackoverflow.com/questions/6322916/ie9-bug-with-increased-font-size-of-css-content. em 대신 rem을 사용하는 것이 좋습니다. –

+0

고마워요 ... 나는 아직 레를 듣지 못했습니다. 나는 그것을 시도하고 불행하게도 나는 똑같은 결과를 얻고있다. .... –

답변

0

Nevermind ... 알아 냈어. 선택기 div를 사용하여 font-size를 지정했기 때문에 h1 태그의 사용자 에이전트 스타일이 내 div 글꼴 크기 스타일보다 우선합니다. 내 글꼴 크기 스타일을 h1 선택기를 사용하도록 변경했으며 모두 좋았습니다.

관련 문제