HTML 代码
<!DOCTYPE html>
<html lang="en">
<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>scroll</title>
<link rel="stylesheet" type="text/css" href="scroll.css">
</head>
<body>
<section>
<img src="images/bg.jpg" id="bg">
<img src="images/moon.png" id="moon">
<img src="images/mountain.png" id="mountain">
<img src="images/road.png" id="road">
<h2 id="text">Moon Light</h2>
</section>
<script>
/*获取元素 */
let bg = doc