Михаил Капелько 1年前
父节点
当前提交
827f3e2718
共有 2 个文件被更改,包括 43 次插入0 次删除
  1. 二进制
      iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate
  2. +43
    -0
      web/memory.html

二进制
iOS/app/MMMemory.xcodeproj/project.xcworkspace/xcuserdata/mk.xcuserdatad/UserInterfaceState.xcuserstate 查看文件


+ 43
- 0
web/memory.html 查看文件

@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>Память | Memory</title>
</head>
<body>
</body>
<script>
/*
document.onclick = function() {
document.body.innerHTML += "!";
};
*/

var items = []

// Section16Buttons.
for (var i = 0; i < 16; i++) {
let item = document.createElement("div")
document.body.appendChild(item)
items.push(item)
item.id = `${i}`
}

// SectionGrid.
let side = Number(50)
let space = Number(20)
let gap = Number(side + space)
for (var id in items) {
var item = items[id]
let row = Math.floor(id / 4)
let x = gap + (id - row * 4) * gap
let y = gap + row * gap
item.style.left = `${x}px`
item.style.top = `${y}px`
item.style.width = `${side}px`
item.style.height = `${side}px`
item.style.position = "absolute"
item.style.background = "blue"
}

</script>
</html>

正在加载...
取消
保存