简体   繁体   中英

random size and position of many div

This is my codepen: https://codepen.io/duonglam271/pen/pdyWgy

<div class="bubble"></div>

however, i want to make many bubbles like that with different size and position like this http://www.littlebeing.org/ please help me

  1. If you want to create more bubbles, i think you should use appendChild method in javascript
  2. If you want to random size and position, let take a look for CSS Variables (Custom Properties) or another way to create CSS global variables.
  3. Set random value with random() function in CSS preprocessors like Sass to beautify your animation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM