CSS特效015:7个小球转圈圈加载效果

本文介绍了如何使用CSS实现7个小球的旋转加载效果,通过`transform:rotate(1turn)`和延迟动画,展示了CSS基础技巧。同时概述了CSS的基础知识点,包括选择器、样式属性、布局方法等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CSS常用示例100+专栏目录

本专栏记录的是经常使用的CSS示例与技巧,主要包含CSS布局,CSS特效,CSS花边信息三部分内容。其中CSS布局主要是列出一些常用的CSS布局信息点,CSS特效主要是一些动画示例,CSS花边是描述了一些CSS相关的库、知识点、理论篇章等。 因为常用所以记录、展示、分享,希望能给您带来帮助。

文章目录

css实战中,怎么绘制7个小球转圈圈加载效果呢?主要利用了transform: rotate(1turn);的旋转功能,这里将7个小球设置不同的大小颜色,同时延时旋转开始的时间,达到一个分离的效果。

效果图

在这里插入图片描述

源代码

/*
* @Author: 大剑师兰特(xiaozhuanlan),还是大剑师兰特(CSDN)
* @此源代码版权归大剑师兰特所有,可供学习或商业项目中借鉴,未经授权,不得重复地发表到博客、论坛,问答,git等公共空间或网站中。
* @Email: 2909222303@qq.com
* @weixin: gis-dajianshi
* @First published in CSDN
* @First published time: 2023-11-22
*/
<template>
	<div class="container">
		<div class="top">
			<h3>7个小球转圈圈加载效果</h3>
			<div class="author">大剑师兰特, 还是大剑师兰特,gis-dajianshi</div>
		</div>
		<div class="dajianshi">
			<div class="round"></div>
			<div class="round"></div>
			<div class="round"></div>
			<div class="round"></div>
			<div class="round"></div>
			<div class="round"></div>
			<div class="round"></div>
		</div>
	</div>
</template>

<style scoped>
	.container {
		width: 1000px;
		height: 580px;
		margin: 50px auto;
		border: 1px solid green;
		position: relative;
	}

	.top {
		margin: 0 auto 0px;
		padding: 10px 0;
		background: plum;
		color: #fff;
	}

        .dajianshi {
            margin: 100px auto;
            width: 75px;
            height: 75px;
            position: relative;
        }

        .round {
            position: absolute;
            width: 19px;
            height: 19px;
            border-radius: 50%;
            background-color: red;
            animation: circleRound 2.8s ease infinite;
            transform-origin: 50% 75px;
        }

        .round:nth-child(1) {
            z-index: 7;
        }

        .round:nth-child(2) {
            height: 18px;
            width: 18px;
            background-color: orange;
            animation-delay: .2s;
            z-index: 6;
        }

        .round:nth-child(3) {
            height: 17px;
            width: 17px;
            background-color:yellow;
            animation-delay: .4s;
            z-index: 5;
        }

        .round:nth-child(4) {
            height: 16px;
            width: 16px;
            background-color:green;
            animation-delay: .6s;
            z-index: 4;
        }

        .round:nth-child(5) {
            height: 15px;
            width: 15px;
            background-color:cyan;
            animation-delay: .8s;
            z-index: 3;
        }

        .round:nth-child(6) {
            height: 14px;
            width: 14px;
            background-color:blue;
            animation-delay: 1s;
            z-index: 2;
        }

        .round:nth-child(7) {
            height: 13px;
            width: 13px;
            background-color: purple;
            animation-delay: 1.2s;
            z-index: 1;
        }

        @keyframes circleRound {
            to {
                transform: rotate(1turn);
            }
        }
</style>


在这里插入图片描述

No.大剑师精品GIS教程推荐
0地图渲染基础- 【WebGL 教程】 - 【Canvas 教程】 - 【SVG 教程】
1Openlayers 【入门教程】 - 【源代码+示例 300+】
2Leaflet 【入门教程】 - 【源代码+图文示例 150+】
3MapboxGL【入门教程】 - 【源代码+图文示例150+】
4Cesium 【入门教程】 - 【源代码+综合教程 200+】
5threejs【中文API】 - 【源代码+图文示例200+】
6Shader 编程 【图文示例 100+】
7Geoserver 【配置教程 100+】
8卫星应用开发教程 【配置+应用教程 100+】
9GIS数字孪生与大模型 【应用实战 100+】
10报表与数字大屏 【Echarts 实战示例】 - 【D3 综合教程】 - 【其他大屏】
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

还是大剑师兰特

打赏一杯可口可乐

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值