-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
41 lines (36 loc) · 1.11 KB
/
Copy pathtest.html
File metadata and controls
41 lines (36 loc) · 1.11 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
<!DOCTYPE html>
<html lang="en">
<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"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>AUI快速完成布局</title>
<link rel="stylesheet" type="text/css" href="./css/aui.2.0.css" />
<style type="text/css">
html{
height:100%;
display:flex;
justify-content: center;
align-items: center;
}
#box{
display: flex;
justify-content: center;
}
</style>
<body>
<div id='box' class=".aui-content .aui-content-padded aui-content-padded">
<h1>123</h1>
</div>
</body>
<script>
function change(){
let str = '1,3,4,5';
arr = str.split(',');
document.querySelector("#box h1").innerHTML = arr[Math.floor((Math.random()*arr.length))];
// return arr[Math.floor((Math.random()*arr.length))];
}
setInterval(() => {
change();
}, 1000);
</script>
</html>