<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
background: aliceblue;
}
h2 {
text-align: center;
margin: 20px auto;
}
#box {
background: white;
width: 1000px;
height: 500px;
box-shadow: #000 0 0 3px;
margin: 20px auto;
position: relative;
}
p{ /* 砖块样式 */
width: 100px;
height: 40px;
position: absolute;
}
#baffle{
position: absolute;
width: 200px;
height: 16px;
border-radius: 8px;
background-color: orangered;
left: 400px;
top: 484px;
}
#ball{
z-index: 99;
width: 30px;
height: 30px;
background:rgb(117, 85, 74);
box-shadow: #888 2px 2px 3px;
position: absolute;
top: 454px;
left: 485px;
border-radius: 50%;
}
</