当前位置:网站首页>旋转彩色三叶草
旋转彩色三叶草
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>
边栏推荐
- Matplotlib plt Hist() parameter explanation
- The concept and significance of mean, variance, standard deviation and covariance
- I wonder if I can open an account today? In addition, is it safe to open an account online now?
- Applet plug-in access, development and precautions
- QPainter的使用入门:绘制象棋界面
- 云和恩墨盖国强,识别它、抓住它,在国产数据库沸腾以前
- How about counting Berry Pie 4? What are the possible ways to play?
- 6.28日刷题题解
- Why is JSX syntax so popular?
- LC: effective Sudoku + rotating image
猜你喜欢

Unity splashimage scaling problem

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

由GlideException: Failed DecodePath{DirectByteBuffer->GifDrawable->Drawable}引起的刨根问底

大厂试水 HPE推出Arm CPU通用服务器产品

@Scheduled注解的坑,我替你踩了

Set up security groups, record domain names, and apply for SSL certificates

QT learning 03 birth and essence of QT

Machine learning: the concept and application of VC dimension

Matplotlib plt Hist() parameter explanation

Leetcode (680) -- verifying palindrome string II
随机推荐
QT learning 03 birth and essence of QT
Golang6 reflection
Divisor
雲和恩墨蓋國强,識別它、抓住它,在國產數據庫沸騰以前
剑指 Offer 14- II. 剪绳子 II
matlab习题 —— 程序控制流程练习
Basic tutorial for installing monggodb in win10
Gradle serialization 7- configuration signature
6.29日刷题题解
Solr basic operation 5
Applet plug-in access, development and precautions
HTAP x cloud native: tidb accelerates the release of data value and realizes data agility
Construction of module 5 of actual combat Battalion
云服务器的安全设置常识
QPainter的使用入门:绘制象棋界面
shell-运算符
How about counting Berry Pie 4? What are the possible ways to play?
我想知道今天还可以开户么?另外想问,现在在线开户安全么?
Embedded development: Hardware in the loop testing
solo 博客皮肤导入 skins 文件夹后出现 500 错误