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

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

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

下面记录一个利用纯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取消自动休眠)ubuntu关闭自动休眠命令,ubuntu 关闭自动休眠模式的方法,ubuntu 关闭自动休眠模式的方法,

免费领取腾讯云服务器! 在使用ssh连接ubuntu系统时,发现长时间不输入ssh命令ssh就会自动断开。查找了一下原因,发现是安装ubuntu的电脑自动进入了休眠模式,而ubuntu系统中有多种关闭自动休眠的方法,下面就来说一说使用ssh命令来关闭ubu...

万万没想到(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获取服务器信息)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计算两个数组的交集与差集,php计算两个数组的交集与差集,

免费领取腾讯云服务器! php中计算两个数组之间的交集与差集可以使用 array_intersect() 与 array_diff() 数组处理函数,这两个数组的具体使用方法如下。 php计算两个数组之间的交集 array_...

墙裂推荐(js判断ip是否合法)判断ipv4地址是否合法,js代码判断IP地址的合法性(只支持IPV4),js代码判断IP地址的合法性(只支持IPV4),

免费领取腾讯云服务器! 客户定制了一个IPV4格式的IP地址在线查询的工具,需要用户在前台输入IPV4格的IP地址,为了防止用户输入的IPV4格式的IP错误,又减少后端的服务器资源的浪费,就想到了先在前台用JS脚本判断一下,用户输入的IPV4地址是否合法。...

发表评论

访客

看不清,换一张

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