当前位置:首页 > 电脑知识 > 正文内容

居然可以这样(css画爱心)爱心图形创意,CSS实现爱心形状动态加载条的方法,CSS实现爱心形状动态加载条的方法,

sauo2年前 (2022-09-17)电脑知识45

下面记录一个利用纯CSS样式代码实现一个爱心形状的动态加载条,用到了CSS中的动画效果与伪元素样式,有一定的参考价值。感兴趣的小伙伴,不妨测试一下。

纯CSS实现心形加载动画效果

1、动画效果

2、示例代码

Markup
<style> #he{ display: flex; justify-content: center; align-items: center; height: 200px; background-color: #ffffff; margin-top: 150px; } ul{ padding: 0; margin: 0; } li{ float: left; width: 20px; height: 20px; border-radius: 20px; margin-right: 10px; list-style: none; } li:nth-child(1){ background-color: #f62e74; animation: love1 4s infinite; } li:nth-child(2){ background-color: #f45330; animation: love2 4s infinite; animation-delay: 0.15s; } li:nth-child(3){ background-color: #ffc883; animation: love3 4s infinite; animation-delay: 0.3s; } li:nth-child(4){ background-color: #30d268; animation: love4 4s infinite; animation-delay: 0.45s; } li:nth-child(5){ background-color: #006cb4; animation: love5 4s infinite; animation-delay: 0.6s; } li:nth-child(6){ background-color: #784697; animation: love4 4s infinite; animation-delay: 0.75s; } li:nth-child(7){ background-color: #ffc883; animation: love3 4s infinite; animation-delay: 0.9s; } li:nth-child(8){ background-color: #f45330; animation: love2 4s infinite; animation-delay: 1.05s; } li:nth-child(9){ background-color: #f62e74; animation: love1 4s infinite; animation-delay: 1.2s; } @keyframes love1{ 30%,50%{height: 40px; transform: translateY(-20px);} 75%,100%{height: 20px; transform: translateY(0);} } @keyframes love2{ 30%,50%{height: 95px; transform: translateY(-42.5px);} 75%,100%{height: 20px; transform: translateY(0);} } @keyframes love3{ 30%,50%{height: 140px; transform: translateY(-60px);} 75%,100%{height: 20px; transform: translateY(0);} } @keyframes love4{ 30%,50%{height: 145px; transform: translateY(-40px);} 75%,100%{height: 20px; transform: translateY(0);} } @keyframes love5{ 30%,50%{height: 155px; transform: translateY(-20px);} 75%,100%{height: 20px; transform: translateY(0);} } p{ text-align: center; } </style> <div id="he"> <ul> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> </div> <p>飞鸟慕鱼博客</p>复制

本文链接:http://blog.sauo.top/?id=301 感谢分享!

分享到:

扫描二维码推送至手机访问。

版权声明:本文由冬眠先生个人博客发布,如需转载请注明出处。

本文链接:http://blog.sauo.top/?id=301

分享给朋友:

“居然可以这样(css画爱心)爱心图形创意,CSS实现爱心形状动态加载条的方法,CSS实现爱心形状动态加载条的方法,” 的相关文章

原创(禁止ping命令操作)linux如何停止ping,linux禁ping操作的方法,linux禁ping操作的方法,

免费领取腾讯云服务器! linux中可以通过ssh命令来禁止其它机器来ping自己,下面是配置方法,大家可以参考一下。 linux中禁ping的方法 方法1 临时禁ping,系统重启后失效,已在ubuntu系...

深度揭秘(Ubuntu 防火墙设置)ubuntu防火墙配置文件,ubuntu防火墙的安装与设置,ubuntu防火墙的安装与设置,

免费领取腾讯云服务器! ubuntu系统中的防火墙使用的是iptables,而为了方便防火墙的设置ubuntu提供了一个防火墙管理工具ufw.下面这篇文章就说一说关于防火墙管理工具ufw的安装与使用方法。 ubuntu防火墙ufw的安装与设...

万万没想到(Ubuntu安装ssh服务)ubuntu配置ssh服务器,ubuntu安装ssh服务器的方法,ubuntu安装ssh服务器的方法,

万万没想到(Ubuntu安装ssh服务)ubuntu配置ssh服务器,ubuntu安装ssh服务器的方法,ubuntu安装ssh服务器的方法,

免费领取腾讯云服务器! 安装了一个ubuntu系统,想着在内网中用ssh进行远程连接管理。下面这篇博文就说说如果在ubuntu系统中安装ssh远程管理服务。 ubuntu 安装ssh服务器的方法 1、安装 openssh-s...

一篇读懂(PHP for循环)php跳出循环的语句,php中的几种循环语句,php中的几种循环语句,

免费领取腾讯云服务器! 列举几种php脚本中常用的几种循环语句,比如,for,foreach,do....while 等。 php for循环 for循环在很多语言中都经常用到,比如js语言,c语言,java语言等。...

全程干货(查看php是否启动)查看php是否支持rar解压,查看php是ts版本还是nts版本的方法,查看php是ts版本还是nts版本的方法,

全程干货(查看php是否启动)查看php是否支持rar解压,查看php是ts版本还是nts版本的方法,查看php是ts版本还是nts版本的方法,

免费领取腾讯云服务器! 今天有用户来询问php的ts版本与php的nts版本的区别是什么,怎么去查看自己安装的php服务是ts版本还是nts版本,下面博文就来详细的说一下。 php ts版本与nts版本的区别 php官方提供...

干货分享(php输出json中文乱码)json数据中文乱码怎么办,解决 php json中文乱码的问题,解决 php json中文乱码的问题,

免费领取腾讯云服务器! php输出使用json_encode函数生成的json数据的时候,发现数据中的中文被转义成了unicode编码,如果使用ajax请求的json数据还好一点,浏览器会自动将unicode编码转义回来,但如果直接输出到浏览器上,那就会直...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。