当前位置:网站首页>旋转彩色三叶草
旋转彩色三叶草
2022-06-29 23:53:00 【 星云 】

<!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'); // 无脚本一样可以良好展示,但是得多写好多重复代码,而且不好改 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>
边栏推荐
- The concept and significance of mean, variance, standard deviation and covariance
- Bee common configuration
- 剑指 Offer 14- II. 剪绳子 II
- AI赋能新零售,「智」胜之道在于生态思维|数智夜话直播精选摘录
- Sword finger offer 14- I. cut rope
- Machine learning: the concept and application of VC dimension
- 一步步教你在Edge浏览器上安装网风笔记
- Provide effective performance evaluation 
- 除子
- This simple little function saves 213 hours for our production research team in half a year
猜你喜欢

FPGA Development (2) -- IIC communication

这次的PMP考试(6月25日),有人欢喜有人忧,原因就在这...

设置安全组、域名备案、申请ssl证书

matlab习题 —— 程序控制流程练习

云服务器的安全设置常识

How to write controller layer code gracefully?

Andorid source build/envsetup.sh 该知道的细节

西门子低代码平台通过Database Connector 连接Mysql 实现增删改查

Sword finger offer 14- ii Cutting rope II

LC: maximum subarray and
随机推荐
New titanium cloud service won the "2022 love analysis · panoramic report of it operation and maintenance manufacturers" cloud management platform CMP representative manufacturer
Zhongkang holdings opens the offering: it plans to raise HK $395million net, and it is expected to be listed on July 12
After working in the software development industry for six years, I changed my ideas in those years
RRDTOOL draws MRTG log data
Solr basic operation 5
AI首席架构师9-胡晓光 《飞桨模型库与行业应用》
QT learning 03 birth and essence of QT
Siemens low code version 9.14: meet different needs
Cacti settings for spin polling
Solr basic operation
Table responsive layout tips for super nice
Gradle连载7-配置签名
剑指 Offer 15. 二进制中1的个数
Viewing splitchunks code segmentation from MPX resource construction optimization
大厂试水 HPE推出Arm CPU通用服务器产品
FPGA开发(2)——IIC通信
漫画安全HIDS、EDR、NDR、XDR
6.28日刷题题解
Simple understanding of B tree and b+ tree
【一起上水硕系列】Day 8