发霉的被子长小红点,发霉的被子洗不干净还能用吗

「HTML+CSS」--自界说加载动画【027】前言

Hello!小同伴!

很是谢谢您阅读海轰的文章,倘若文中有错误的地方,接待您指出~

自我先容 ଘ(੭ˊᵕˋ)੭

昵称:海轰

标签:法式猿|C++选手|学生

简介:因C语言结识编程,随后转入盘算机专业,有幸拿过一些国奖、省奖...已保研。现在 正在学习C++/Linux/Python

学习履历 :扎实基础 + 多做条记 + 多敲代码 + 多思索 + 学好英语!

初学Python 小白阶段

文章仅作为自己的学习条记 用于知识系统 建设以及温习

题不在多 学一题 懂一题

知其然 知其以是 然!

效果展示

在这里插入图片形貌

Demo代码

HTML

!DOCTYPE htmlhtml 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" link rel="stylesheet" href="style.css" titleDocument/title/headbody sectionspan/span/section/body/html

CSS

html,body{ margin: 0; height: 100%;}body{ display: flex; justify-content: center; align-items: center; background: #263238;}section { width: 650px; height: 300px; padding: 10px; position: relative; display: flex; align-items: center; justify-content: center; border: 2px solid red;}span { width : 96px; height: 96px; border-radius: 50%; display: inline-block; position: relative; border: 10px solid white; border-bottom-color: transparent; animation: rotation 2s linear infinite ;}span::after{ content: '' position: absolute; left: 51px; top: 79px; border: 20px solid transparent; border-right-color: white; transform: rotate(-45deg);}@keyframes rotation { 0% { transform: rotate(0deg) } 100% { transform: rotate(360deg) }}原理详解步骤1

使用span标签作为箭尾,设置为

宽度、高度均为96px边框:10px solid,其中上/左/右边框为白色 下边框为透明 width : 96px; height: 96px; border: 10px solid white; border-bottom-color: transparent;

效果图如下

在这里插入图片形貌

步骤2

span标签圆角化

border-radius: 50%;

效果图如下

在这里插入图片形貌

步骤3

使用span::after伪类元素 作为箭头

设置为

绝对定位边框:20px solid,右边框为白色,上/下/左边框为透明旋转-45度 position: absolute; /* left: 51px; top: 79px; */ border: 20px solid transparent; border-right-color: white; transform: rotate(-45deg);

效果图如下

图片红色部门即为span::after

步骤4

设置span::after的位置

注:

这里移动位置时间 就需要一点点移动了确保箭头和箭尾可以很好的重合这里一定 是可以用数学公式盘算出来的,这里稍微需要点时间,之后有空再更新更为一样平常 情形 时需要移动的距离公式吧/*这里箭头需要移动的距离*/ left: 51px; top: 79px;

效果图如下

步骤5

为span添加动画

顺时针旋转(0-360度) 2s 无限循环 animation: rotation 2s linear infinite ;/*动画实现*/@keyframes rotation { 0% { transform: rotate(0deg) } 100% { transform: rotate(360deg) }}

结语

文章仅作为学习条记,纪录从0到1的一个历程

希望对您有所资助,若有 错误接待小同伴指正~

我是 海轰ଘ(੭ˊᵕˋ)੭

若是 您以为 写得可以的话,请点个赞吧

谢谢支持 ❤️

最新版权声明:鹊肤霖提醒您:在浏览本本网站(gta5人物身上全是红点)侠盗猎车追越野车任务?信息时,请您务必阅读并理解本声明。本网站部分内容来源于网络,如您认为本网不应该展示与您有关的信息,请及时与我们取得联系,我们会尊重您的决定并当天作出处理。作者:鹊肤霖 转载请注明转载地址

专业祛鸡皮肤 微信 : zyjs28 (长按可以复制)

专注:鸡皮肤、鱼鳞皮肤、蛇鳞皮肤、红点瘙痒