WEB/jQuery

html5shiv.js

연꽃- 2016. 11. 29. 13:30

'익스플로러 버전9이하 브라우저에서 HTML5를 지원하도록 하는'


html5shiv




html5shiv사용법


버전 9보다 낮은 익스플로러를 위한 방법이므로 '조건 별 주석처리'를 활용하는데, 9보다 낮은(less than) 버전의 익스플로러 임을 나타내는 구문 'if it IE 9'를 쓴다.
다운로드한 파일의 dist 폴더에서 사용할 파일을 선택한 후 <head>부분에 아래와 같이 적용한다.
HTML
<head>
<!--[if lt IE 9]>
    <script src="경로명/html5shiv.js"></script>
<![endif]-->
</head>
이 코드를 사용한 경우 CSS에서 해당 블럭요소들을 display:block 해주어야 한다.
CSS
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {display: block;}


출처 : http://webdir.tistory.com/81