-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselect.html
More file actions
53 lines (52 loc) · 1.42 KB
/
Copy pathselect.html
File metadata and controls
53 lines (52 loc) · 1.42 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<title>select</title>
<script>
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
if(clientWidth>=640){
docEl.style.fontSize = '100px';
}else{
docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
}
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
console.log(docEl)
})(document, window);
</script>
<style>
*{
margin: 0;
padding:0;
}
select{
display: block;
-webkit-appearance:none;
background-color: #fff;
border-radius: 4px;
width: 2rem;
height: .4rem;
margin: 2rem auto;
border: 1px solid #999;
}
</style>
</head>
<body>
<select>
<option value="111">111</option>
<option value="111">111</option>
<option value="111">111</option>
<option value="111">111</option>
<option value="111">111</option>
</select>
</body>
</html>