-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (67 loc) · 2.41 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html lang="ko">
<head>
<title> </title>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta name='Title' content=''>
<meta name='Subject' content=''>
<meta name='Keywords' content=''>
<meta name='Author' content=''>
<meta name='Publisher' content=''>
<meta name='Description' content=''>
<meta name='Author-Date' content=''>
<meta name='Copyright' content=''>
<!-- 접근성 텍스트(skip) 숨김 -->
<style>#skip{overflow: hidden; position:absolute; width:0; height:0; line-height:0; text-indent:-9999px;}</style>
<!-- 폰트어썸 -->
<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.5.0/css/all.css' integrity='sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU' crossorigin='anonymous'>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'>
<!-- 구글폰트 아이콘 -->
<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0' />
<!-- CSS 리셋 -->
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css'>
<!-- 제이쿼리 3.7 CDN -->
<script src='https://code.jquery.com/jquery-3.7.0.min.js' crossorigin='anonymous'></script>
<!-- 로컬 CSS -->
<link rel='stylesheet' href='./css/style.css'/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<!-- 로컬 js -->
<script src='./js/script.js' defer></script>
</head>
<body>
<!-- 시각장애인 웹 접근성을 위한 skip _ 지우지않아도 됩니다. -->
<ul id='skip'>
<li><a href='#header'>헤더 바로가기</a></li>
<li><a href='#nav'>메뉴 바로가기</a></li>
<li><a href='#content'>내용 바로가기</a></li>
</ul>
<!-- 공백을 위한 공간입니다. -->
<h1>Mobile Detect</h1>
<br>
<hr>
<br>
<div class="mobile">
mobile Device
</div>
<div class="pc">
pc Device
</div>
<script>
/* let ratio = window.devicePixelRatio;
console.log(ratio)
if(ratio >= 2){
document.querySelector('.pc').style.display='none';
}else{
document.querySelector('.mobile').style.display='none';
} */
if (Modernizr.touch) {
// supported
document.querySelector('.pc').style.display='none';
} else {
// not-supported
document.querySelector('.mobile').style.display='none';
}
</script>
</body>
</html>