当前位置:网站首页>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>
边栏推荐
- Start harvesting! Nailing: adjust the maximum number of free users of "nailing team". If the number exceeds 10, it will not work normally
- Exploration and Practice on the future direction of byte cloud database
- [wechat applet] understand the basic composition of the applet project
- QT learning 04 Hello QT
- Golang6 reflection
- DOM 知识点总结
- 请指教同花顺软件究竟是什么?究竟网上开户是否安全么?
- Binary search tree 230 The element with the smallest K in the binary search tree 1038 From binary search tree to larger sum tree
- MySQL multi table query
- 多数元素II[求众数类之摩尔投票法]
猜你喜欢

Sword finger offer 13 Range of motion of robot

Summarize Flink runtime architecture in simple terms

QT learning 03 birth and essence of QT

Simple understanding of B tree and b+ tree

这个简单的小功能,半年为我们产研团队省下213个小时

AI chief architect 9- huxiaoguang, propeller model library and industry application

Serialization of binary tree 297 Serialization and deserialization of binary tree 652 Find duplicate subtrees

Leetcode (76) -- Minimum Covering substring

Yunhe enmo, gaiguoqiang, identify it and grasp it before the domestic database boils
![[Shangshui Shuo series] day 8](/img/66/2aaa82f122612db1775bdd45556d97.png)
[Shangshui Shuo series] day 8
随机推荐
视频ToneMapping(HDR转SDR)中的颜色空间转换问题(BT2020转BT709,YCbCr、YUV和RGB)
代码分析平台 SonarQube 实战
Solr基础操作14
爬虫入门实战:斗鱼弹幕数据抓取,附送11节入门笔记
Simple understanding of B tree and b+ tree
Applet plug-in access, development and precautions
Will the flush SQL CDC parallelism affect the order? Generally, only 1 can be set for data synchronization.
Zhongang Mining: Fluorite helps the construction and development of lithium battery in fluorine industry
Virtual machine online migration based on openstack
Halcon practical: design idea of solder joint detection
[rust weekly library] Tokei - a utility for statistics of code lines and other information
【微信小程序】认识小程序项目的基本组成结构
How to write controller layer code gracefully?
QT learning 06 widgets and window types
Golang6 reflection
Code analysis platform sonarqube actual combat
MySQL:SQL概述及数据库系统介绍 | 黑马程序员
漫画安全HIDS、EDR、NDR、XDR
Solr基础操作6
vlog常用参数解析