-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb2_3w-3.html
More file actions
28 lines (25 loc) · 816 Bytes
/
web2_3w-3.html
File metadata and controls
28 lines (25 loc) · 816 Bytes
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
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>test1</title>
</head>
<body>
<script>
document.write("<div>")
for (var i = 0; i < 10; i++) {
b = i * 2;
a = "<div style='display:inline-block;width:20px;height:20px;background:#ff0000;margin-height:50px;margin-left:" + b + "px'></div>";
document.write(a)
}
document.write("</div>")
document.write("<div>")
for (var i = 10; i > 0; i--) {
b = (i-1) * 2;
a = "<div style='display:inline-block;width:20px;height:20px;background:#ff0000;margin-height:100px;margin-right:" + b + "px'></div>";
document.write(a)
}
document.write("</div>")
</script>
</body>
</html>