<!-- tsParticles container -->
<div id="tsparticles"></div>
<div id="flag-container">
  <div class="flag">
    <div id="italy-flag">
      <div id="italy-green-div"></div>
      <div id="italy-white-div"></div>
      <div id="italy-red-div"></div>
    </div>
  </div>
  <div class="flag">
    <div id="france-flag">
      <div id="france-blue-div"></div>
      <div id="france-white-div"></div>
      <div id="france-red-div"></div>
    </div>
  </div>
  <div class="flag">
    <div id="germany-flag">
      <div id="germany-black-div"></div>
      <div id="germany-red-div"></div>
      <div id="germany-yellow-div"></div>
    </div>
  </div>
  <div class="flag">
    <div id="spain-flag">
      <div id="spain-top-red-div"></div>
      <div id="spain-yellow-div"></div>
      <div id="spain-bottom-red-div"></div>
    </div>
  </div>

  <!-- https://github.com/matteobruni/tsparticles -->
  <div class="github">
    <a class="btn btn-link" href="https://github.com/matteobruni/tsparticles" title="Find more info on GitHub">
      <img class="img-fluid" id="gh-mark" src="https://cdn.matteobruni.it/images/particles/GitHub-Mark-120px-plus.png" alt="">
      <span id="gh-project">tsParticles</span>
    </a>
    <div>
      <a class="github-button" href="https://github.com/matteobruni/tsparticles" data-icon="octicon-star" aria-label="Star matteobruni/tsparticles on GitHub">Star</a>
      <a class="github-button" href="https://github.com/matteobruni/tsparticles/fork" data-icon="octicon-repo-forked" aria-label="Fork matteobruni/tsparticles on GitHub">Fork</a>
      <a class="github-button" href="https://github.com/matteobruni/tsparticles/releases/tag/v1.15.1" data-icon="octicon-download" aria-label="Download matteobruni/tsparticles on GitHub">Download</a>
    </div>
  </div>
  <script async="" defer="" src="https://buttons.github.io/buttons.js"></script>
/* ---- reset ---- */
body {
  margin: 0;
  font: normal 16px Arial, Helvetica, sans-serif;
  color: #333;
}

canvas {
  display: block;
  vertical-align: bottom;
}
/* ---- tsparticles container ---- */
#tsparticles {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#flag-container {
  position: fixed;
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
}

.flag {
  flex: 1;
  display: flex;
}

#italy-flag {
  flex: 1;
  display: flex;
  flex-direction: row;
}

#italy-green-div {
  flex: 1;
  border: 1px solid #00ff00;
}

#italy-white-div {
  flex: 1;
  border: 1px solid #ffffff;
}

#italy-red-div {
  flex: 1;
  border: 1px solid #ff0000;
}

#france-flag {
  flex: 1;
  display: flex;
  flex-direction: row;
}

#france-blue-div {
  flex: 1;
  border: 1px solid #0000ff;
}

#france-white-div {
  flex: 1;
  border: 1px solid #ffffff;
}

#france-red-div {
  flex: 1;
  border: 1px solid #ff0000;
}

#germany-flag {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#germany-black-div {
  flex: 1;
  border: 1px solid #000000;
}

#germany-red-div {
  flex: 1;
  border: 1px solid #ff0000;
}

#germany-yellow-div {
  flex: 1;
  border: 1px solid #ffff00;
}

#spain-flag {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#spain-top-red-div {
  flex: 1;
  border: 1px solid #ff0000;
}

#spain-bottom-red-div {
  flex: 1;
  border: 1px solid #ff0000;
}

#spain-yellow-div {
  flex: 3;
  border: 1px solid #ffff00;
}

.github {
  bottom: 10px;
  right: 10px;
  position: fixed;
  border-radius: 10px;
  background: #fff;
  padding: 0 12px 6px 12px;
  border: 1px solid #000;
}

.github a:hover,
.github a:link,
.github a:visited,
.github a:active {
  color: #000;
  text-decoration: none;
}

.github img {
  height: 30px;
}

.github #gh-project {
  font-size: 20px;
  padding-left: 5px;
  font-weight: bold;
  vertical-align: bottom;
}
tsParticles.load("tsparticles", {
  fpsLimit: 60,
  background: {
    color: "#333"
  },
  interactivity: {
    detectsOn: "canvas",
    events: {
      onDiv: {
        enable: true,
        ids: [
          "italy-green-div",
          "italy-white-div",
          "italy-red-div",
          "france-blue-div",
          "france-white-div",
          "france-red-div",
          "germany-black-div",
          "germany-red-div",
          "germany-yellow-div",
          "spain-top-red-div",
          "spain-bottom-red-div",
          "spain-yellow-div"
        ],
        mode: "bubble",
        type: "rectangle"
      },
      resize: true
    },
    modes: {
      bubble: {
        distance: 400,
        duration: 2,
        opacity: 0.8,
        size: 4,
        speed: 3,
        divs: [
          {
            ids: "italy-green-div",
            color: "#00ff00"
          },
          {
            ids: "france-blue-div",
            color: "#0000ff"
          },
          {
            ids: "germany-black-div",
            color: "#000000"
          },
          {
            ids: ["germany-yellow-div", "spain-yellow-div"],
            color: "#ffff00"
          },
          {
            ids: ["italy-white-div", "france-white-div"],
            color: "#ffffff"
          },
          {
            ids: [
              "italy-red-div",
              "france-red-div",
              "germany-red-div",
              "spain-top-red-div",
              "spain-bottom-red-div"
            ],
            color: "#ff0000"
          }
        ]
      }
    }
  },
  particles: {
    color: {
      value: "#ffffff"
    },
    links: {
      color: "random",
      distance: 50,
      enable: true,
      opacity: 0.4,
      width: 1
    },
    move: {
      collisions: true,
      direction: "none",
      enable: true,
      out_mode: "bounce",
      random: false,
      speed: 5,
      straight: false
    },
    number: { density: { enable: true, value_area: 800 }, value: 600 },
    opacity: {
      animation: { enable: true, minimumValue: 0.1, speed: 1, sync: false },
      random: true,
      value: 0.5
    },
    shape: {
      type: "square"
    },
    size: {
      animation: {
        enable: true,
        minimumValue: 2,
        speed: 1,
        sync: false
      },
      random: {
        enable: true,
        minimumValue: 2
      },
      value: 4
    }
  },
  detectRetina: true
});

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css

External JavaScript

  1. https://cdn.jsdelivr.net/npm/tsparticles@1.18.3/dist/tsparticles.min.js