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

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

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

下面记录一个利用纯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求数组交集)php数组取差集,php计算两个数组的交集与差集,php计算两个数组的交集与差集,

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

这都可以(判断是否是ajax请求)php判断请求方式,php判断是否为ajax请求的方法,php判断是否为ajax请求的方法,

免费领取腾讯云服务器! 在后端可以利用php代码来判断前台提交的数据是否通过ajax进行提交的,其方法也非常的简单,只需要判断$_SERVER["HTTP_X_REQUESTED_WITH"] 是否存在,以及判断 $_SERVER["HTTP_X_REQU...

学会了吗(php保存文件到指定地点)php保存图片,php保存base64编码图片的方法,php保存base64编码图片的方法,

免费领取腾讯云服务器! 写一个图片上传的插件,因为特殊性就在前台将图片转为base64编码并上传到后台,下面说一说在后台怎么利用php代码将base64编码格式的图片转成正常的图片,并保存的。 PHP保存Base64图片 p...

这都可以?(jquery去掉前后空格)jquery去掉字符串前后空格,jQuery去掉 serialize() 方法中指定的name值,jQuery去掉 serialize() 方法中指定的name值,

免费领取腾讯云服务器! 在修改一个前台表单提交逻辑时,为了不动以前的代码(代码和屎一样),就想着在提交数据时过滤掉form表单中指定的name属性和值,由于表单直接使用jquery中的serialize()方法来获取的form表单的数据,所以就要对 ser...

发表评论

访客

看不清,换一张

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