当前位置:网站首页>Rotating colored clover
Rotating colored clover
2022-06-30 00:09:00 【Nebula】

<!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>Document</title>
<style> @keyframes move {
0%, 100% {
width: 12rem; } 50% {
width: 20rem; } } body {
background-color: #222; } .group {
margin: auto; width: 25rem; height: 25rem; text-align: left; } .box {
position: absolute; white-space: nowrap; top: 50%; width: 20rem; } .ball {
display: inline-block; width: .75rem; height: .75rem; border-radius: 100%; } .bar {
display: inline-block; height: .75rem; animation: move 2s ease-in-out infinite; } </style>
</head>
<body>
<div class="container">
<div id="group" class="group">
</div>
</div>
</body>
<script> var group = document.getElementById('group'); // It can be well demonstrated without scripts , But I have to write a lot of repetitive code , And it's hard to change for (var i = 0; i < 18; i++) {
var ball = document.createElement('div'); ball.className = 'ball'; ball.setAttribute('style', `background-color: hsl(${
i * 20},100%,50%)`) var bar = document.createElement('div'); bar.className = 'bar'; bar.setAttribute('style', `animation-delay: -${
i / 3}s;`) var box = document.createElement('div'); box.className = 'box'; box.setAttribute('style', `transform: rotate(${
i * 20}deg);`) box.appendChild(bar); box.appendChild(ball); group.appendChild(box); } </script>
</html>
边栏推荐
- [Shangshui Shuo series] day 8
- Analysis of define incdir command in TCL script of Modelsim
- MySQL functions and constraints
- Andorid source build/envsetup. SH details to know
- 數莓派 4怎麼樣?可能的玩法有哪些?
- Vulnhub target -moriartycorp
- Unity splashimage scaling problem
- Start harvesting! Nailing: adjust the maximum number of free users of "nailing team". If the number exceeds 10, it will not work normally
- I wonder if I can open an account today? In addition, is it safe to open an account online now?
- QT learning 05 introduction to QT creator project
猜你喜欢

This simple little function saves 213 hours for our production research team in half a year

Sword finger offer 13 Range of motion of robot

Embedded development: Hardware in the loop testing

Color space conversion in video tonemapping (HDR to SDR) (bt2020 to bt709, YCbCr, YUV and RGB)

视频ToneMapping(HDR转SDR)中的颜色空间转换问题(BT2020转BT709,YCbCr、YUV和RGB)

6.29 problem solving

Buffer flow exercise

koa2学习和使用

ThinkPad VMware installation virtual machine: this host supports Intel VT-x, but Intel VT-x is disabled (problem resolution)

333333333333333333333333333333
随机推荐
旋转彩色三叶草
Copy linked list with random pointer [space for time --hash record]
漫画安全HIDS、EDR、NDR、XDR
Common knowledge of ECS security settings
Vulnhub靶机-MoriartyCorp
500 error occurred after importing skins folder into solo blog skin
Root cause of glideexception: failed decodepath{directbytebuffer- > gifdrawable- > drawable}
Gradle serialization 7- configuration signature
QT learning 01 GUI program principle analysis
Set up security groups, record domain names, and apply for SSL certificates
Basic operations such as MySQL startup under Windows platform
Unity about failure (delay) of destroy and ondestroy
DOM 知识点总结
What is online account opening? In addition, is it safe to open a mobile account?
Analysis of define incdir command in TCL script of Modelsim
FPGA Development (1) -- serial port communication
6.28日刷题题解
After 8 years of polishing, "dream factory of game design" released an epic update!
MySQL:SQL概述及数据库系统介绍 | 黑马程序员
How about counting Berry Pie 4? What are the possible ways to play?