
<!DOCTYPE html><html><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>getBoundingClientRect</title> <link rel="stylesheet" href="css/reset.min.css"> <style> html, body { height: 300%; background: -webkit-linear-gradient(top left, pink, orange); } #box { position: absolute; left: 200px; top: 800px; width: 100px; height: 100px; background: red; } </style></head><body> <div id="box"></div> <script> let box = document.querySelector('#box'); </script></body></html>