브라우져별 웹폰트 적용방법

2012. 12. 3. 13:46 Web/CSS

웹폰트 사용에 따른 브라우져별 적용방법

@media all and (min-width:768px){
@font-face{
font-family:NG;
src:url(NanumGothic.eot);
src:local(),url(NanumGothic.woff) format('woff')
}
body{
font-family:나눔고딕,NanumGothic,NG,돋움,Dotum,Arial,Helvetica,sans-serif
}
}

  • IE 6~8 브라우저는 EOT 형식만 지원
  • 크롬, 사파리, 파이어폭스, 오페라 브라우저는 WOFF 형식만 지원
  • IE 9 브라우저는 EOT, WOFF 형식을 모두 지원



  • IE 9 브라우저는 @media 규칙 안에 선언한 @font-face 규칙을 해석하지 않는다.
    @media all and (min-width:768px){
    @font-face{ ... } /* IE 9 does not parse this line */
    }

    ※ 해결방법

    IE 조건부 주석을 이용하면 IE 9 버전의 브라우저만 default.ie9fix.css 파일을 해석
    <!--[if IE 9]>
    <link rel="stylesheet" href="default.ie9fix.css" />
    <![endif]-->


    default.ie9fix.css
    @font-face{
    font-family:NG;
    src:url(NanumGothic.eot);
    src:local(※),url(NanumGothic.woff) format('woff')
    }
    body{
    font-family:나눔고딕,NanumGothic,NG,돋움,Dotum,Arial,Helvetica,sans-serif
    }
    ※ font-face 구문을 @media 구문 안에 넣지 않는것이 핵심.


    -출처: naradesign.net

    'Web > CSS' 카테고리의 다른 글

    [CSS3]새로 생성된 태그/속성  (0) 2013.01.29
    [CSS3]미디어쿼리 작성 순서  (0) 2012.12.03
    테이블 display:block 브라우져 출력이상 해결  (0) 2012.09.26
    이미지맵 마우스 커서 모양바꾸기  (0) 2012.07.30
    Css default  (0) 2012.03.13

    테이블 display:block 브라우져 출력이상 해결

    2012. 9. 26. 12:02 Web/CSS

    tr안에 display:block을 주면 익스에서만 테이블 틀을 유지하고
    다른 브라우져에서는 테이블 값이 변경되어 보이는 문제
    tr안에 display:block 대신 display:table-row; *display:block로 변경하면 해결

    <tr id = "gubun1" style="display:block;">
    <tr id = "gubun1" style="display:table-row; *display:block;">

    'Web > CSS' 카테고리의 다른 글

    [CSS3]새로 생성된 태그/속성  (0) 2013.01.29
    [CSS3]미디어쿼리 작성 순서  (0) 2012.12.03
    브라우져별 웹폰트 적용방법  (0) 2012.12.03
    이미지맵 마우스 커서 모양바꾸기  (0) 2012.07.30
    Css default  (0) 2012.03.13

    이미지맵 마우스 커서 모양바꾸기

    2012. 7. 30. 10:22 Web/CSS


    이미지맵에 바로 스타일로 주면 적용이 안됨

    <img src="" usemap="#Map" id="map_cursor" />
    <map name="Map" id="Map">
      <area shap="rect" coords="7,8,102,22" onMouseOver="map_cursor.style.cursor='hand'"   onMouseOut="map_cursor.style.cursor='auto'" />
    </map>

    'Web > CSS' 카테고리의 다른 글

    [CSS3]새로 생성된 태그/속성  (0) 2013.01.29
    [CSS3]미디어쿼리 작성 순서  (0) 2012.12.03
    브라우져별 웹폰트 적용방법  (0) 2012.12.03
    테이블 display:block 브라우져 출력이상 해결  (0) 2012.09.26
    Css default  (0) 2012.03.13

    Css default

    2012. 3. 13. 13:39 Web/CSS

    /*********************************************
    *  Huckleberry Mit Reset : 2012.03.11
    *********************************************/
    /*MASTER*/
    *{margin:0;padding:0; font-family:'돋움',dotum,Helvetica,sans-serif;}
    html,body{width:100%; height:100%;}
    html{overflow-y:scroll;}
    body{background-color:#fff; *word-break:break-all; -ms-word-break:break-all;}
    body,h1,h2,h3,h4,h5,h6,input,textarea,select,option,button,th,td{font-size:12px; color:#555;}
    img,fieldset,iframe{border:0 none;}
    li{list-style:none;}
    a{color:#333;text-decoration:none;}
    a:hover,a:focus{color:#000;text-decoration:underline;}
    em,address,dfn{font-style:normal;}
    button,label{cursor:pointer;_cursor /**/:hand;}
    button *{position:relative;}
    button img{left:-3px;*left:auto;}
    textarea{overflow:auto;}
    html:first-child select{height:20px;padding-right:6px;}
    option{padding-right:6px;}

    /* COMMON*/
    .input_text,textarea{*margin:-1px 0;padding-right:1px;}
    .input_check,.input_radio{width:13px;height:13px;}
    legend{display:block;overflow:hidden;position:absolute;top:-1000em;left:0;}
    hr{display:none;}
    legend{*width:0;}
    :root legend{margin-top:-1px;font-size:0;line-height:0;}

    /*HIDDEN*/
    .blind{display:block;overflow:hidden;position:absolute;top:-1000em;left:0;}
    .hidden{visibility:hidden; width:0; line-height:0; font-size:0;}

    /*SKIP*/
    .skip{}
    .skip a{display:block; position:absolute; left:0; top:-1000em;z-index:9999; width:100%; background-color:navy; font-size:1.4em; font-weight:bold; color:yellow; text-align:center;}
    .skip a:hover,.skip a:focus,.skip a:active{top:0; padding:1.5em 0;}

    /*TEST*/
    .t{border:1px solid red;}
    .tbg{background:red;}


    Copyright © HuckleberryM All Rights Reserved | JB All In One Designed by CMSFactory.NET