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

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

sauo3年前 (2022-09-17)电脑知识88

下面记录一个利用纯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实现爱心形状动态加载条的方法,” 的相关文章

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

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

这都可以?(php获取服务器信息)php获取客户端,php获取服务器操作系统类型的方法,php获取服务器操作系统类型的方法,

免费领取腾讯云服务器! 利用php脚本中的 php_uname() 函数与 PHP_OS 变量可以获取服务器操作系统的类型,具体的使用方法如下。 php获取服务器操作系统的方法 1、php_uname() 获取服务器操作系统...

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

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

不看后悔(php全局变量有哪些)php全局变量和局部变量的区别,php全局变量与js全局变量的区别,php全局变量与js全局变量的区别,

免费领取腾讯云服务器! 因为经常写php与js代码,有时候使用全局变量的时候经常的混淆,这篇文章就来说说js中的全局变量与php中的全局变量的区别。 js全局变量与php全局变量的区别 php全局变量 php...

没想到(PHP重定向)php获取重定向后的地址,php实现页面重定向的方法,php实现页面重定向的方法,

免费领取腾讯云服务器! php脚本实现页面重定向有多种方法,下面列几种简单的方法,供大家来参考一下。 php实现页面重定向的方法 方法1: 使用php中的 header() 函数来实现页面的跳转,实现重定向的...

速看(js将图片转换为二进制流)js将图片转换为webp,js将图片转换为base64编码方法,js将图片转换为base64编码方法,

免费领取腾讯云服务器! js可以将图片文件转成base64编码的,便于图片文件的上传与处理,下面就写几种关于js脚本来转换图片为base64编码的方法。 js将图片转换为base64编码的方法 方法1 将自身...

发表评论

访客

看不清,换一张

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