失踪人口回归啦!
兄弟们,我回来啦!呜呜呜!Unity好难学
今天搞了个打砖块
截图:
就这个,好难啊!
好了,不多哔哔。
啊!哈哈哈哈,代码来咯:
<!DOCTYPE html>
<html lang = "en">
<head>
<meta charset = "UTF-8">
<meta name = "viewport" content = "width = device-width, initial-scale = 1.0">
<title>打砖块游戏</title>
// 搭建画布
<style>
#box {
width: 600px;
height: 650px;
border: 5px solid rgb(168, 139, 8);
position: relative;
left: 500px;
background: linear-gradient(rgb(19, 192, 120), rgb(47, 32, 114));
}
#ball {
width: 20px;
height: 20px;
border-radius: 10px;
background-color: white;
position: absolute;
top: 560px;
box-shadow: 0px 0px 3px 3px aqua;
}
#btn {
width: 150px;
height: 90px;
position: fixed;
left: 730px;
top: 350px;
border-radius: 10px;
font-size: 24px;
cursor: pointer;
}
#slide {
width: 120px;
height: 20px;
background-color: rgb(168, 139, 8);
position: absolute;
top: 585px;
border-radius: 10px;
box-shadow: 0px 0px 2px 2px red;
cursor: pointer;
}
#brick div {
width: 98px;
height: 20px;
float: left;
border: 1px solid black;
}
#tip {
width: 280px;
position: fixed;
top: 100px;
left: 150px;
border: 1px solid black;
text-indent: 2em;
padding: 10px;
border-radius: 20px;
}
#grade {
width: 180px;
position: fixed;
top: 100px;
left: 1150px;
border: 1px solid black;
text-indent: 2em;
padding: 10px;
border-radius: 20px;
}
#grade h3 {
font-weight: 500;
}
</style>
</head>
<body>
// 规则与难度
<div id = "box">