개인공간

[CSS] font-face 본문

IT정보/CSS_CSS3

[CSS] font-face

천재소년s 2014. 7. 22. 16:51
반응형

이번에 font-face를 사용해서 홈페이지를 만들었는데 문제 발생을 하였다.

아래처럼 작업했더니 웹호스팅에서 적용을 못해주는거였다. 서버도 다 환경에 맞게 수정했는데도 안되었다.

   
@font-face{
    font-family:NanumBG;
    src:url(/front/com/font/NanumBarunGothic.eot);
    src:local(NanumBarunGothic), url(/front/com/font/NanumBarunGothic.woff) format('woff');
    src:local(NanumBarunGothic), url(/front/com/font/NanumBarunGothic.ttf) format('truetype');
}


[보완 : 아래처럼 써보길]

@font-face{
    font-family:ng;
    src:url(NanumGothic.eot);
    src:local(※), url(NanumGothic.woff) format(‘woff’),
	url(NanumGothic.otf) format(opentype)
}


@font-face {
  font-family: 'Nanum Barun Gothic';
  font-style: normal;
  font-weight: 400;
  src: local('Nanum Barun Gothic Regular'), local('Nanum Barun Gothic-Regular'), local('NanumBarunGothic Regular');
  src: url(../fonts/NanumBarunGothic.eot);
  src: url(../fonts/NanumBarunGothic.eot?#iefix) format('embedded-opentype'),
       url(../fonts/NanumBarunGothic.woff) format('woff'),
       url(../fonts/NanumBarunGothic.ttf) format('truetype');
}
반응형

'IT정보 > CSS_CSS3' 카테고리의 다른 글

[css] ol 자동 리스트  (0) 2017.01.23
[CSS] 모바일버전 미디어쿼리  (0) 2015.12.15
[CSS3] css3 레이아웃 잡기(display:box)  (0) 2014.01.29
[CSS3] before을 이용한 리스트형태  (0) 2014.01.28
[CSS3] 모바일버튼  (0) 2014.01.28