| 원저자 | Faruk Ateş |
|---|---|
| 개발자 | Faruk Ateş, Paul Irish, Alex Sexton, Ryan Seddon, Patrick Kettner, Stu Cox, Richard Herrera, 기여자들 |
| 발표일 | 2009년 7월 1일 |
| 안정화 버전 | 3.13.1
/ 2024년 8월 6일 |
| 저장소 | |
| 프로그래밍 언어 | 자바스크립트 |
| 종류 | 자바스크립트 라이브러리 |
| 라이선스 | MIT; 과거: 듀얼 라이선스 MIT-BSD 2010년 6월 14일부터 2012년 9월 15일까지 |
| 웹사이트 | modernizr |
모더나이저(Modernizr)는 작은 크기의 자바스크립트 라이브러리로서, 사용자가 현재 이용중인 웹 브라우저에서 HTML5와 CSS3가 지원하는 기능 중 어떤 기능을 지원하는지 알아볼 때 사용한다.
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<title>Modernizr - JavaScript Example</title>
<script src="path/to/modernizr.js"></script>
</head>
<body>
<p id="result"></p>
<script>
elem = document.getElementById('result');
if ( Modernizr.websockets ) {
elem.innerHTML = 'Your browser supports WebSockets.';
alert("Your browser supports WebSockets");
} else {
elem.innerHTML ='Your browser does not support WebSockets.' ;
}
</script>
</body>
</html>
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<title>Modernizr - CSS Example</title>
<style>
.wsno,
.wsyes { display: none; }
/* Modernizr will add one of the following classes to the HTML element based on
whether or not WebSockets is supported by the user's browser. */
.no-websockets .wsno,
.websockets .wsyes { display: block; }
</style>
<script src="path/to/modernizr.js"></script>
</head>
<body>
<p class="wsno">Your browser does not support WebSockets.</p>
<p class="wsyes">Your browser supports WebSockets.</p>
</body>
</html>
| 이 글은 웹사이트에 관한 토막글입니다. 여러분의 지식으로 알차게 문서를 완성해 갑시다. |