日別アーカイブ: 2021年9月7日

Javascript7.5(ページローダー)

7から続きます

2:ページローダーの実装

作成するもの

HTMLの記述

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
  <link rel="stylesheet" href="loader.css">
  <script src="./pace.js"></script>
</head>
<body>
  <div id="global-container">
    <a href="https://github.hubspot.com/pace/docs/welcome/" target="_blank">PaceJs</a>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<div><img src="images/flowers1.jpg" alt="" /></div>
<style>
img {
 max-width: 100%;
}
</style>
  </div>
</body>
</html>

SCSSの記述

続きを読む