HTML+CSS+JS实现 ❤️3D奥运五环图形特效❤️

     效果演示:

   代码目录:

主要代码实现:

CSS样式:

/*** debug in progress ***/:root {--metal: #ffffff45;--gold: repeating-conic-gradient(#edc800 0deg, #ffe800 15deg, #f3cf00 30deg, #e3b600 45deg, #edc800 60deg) 10% 10%;--silver: repeating-conic-gradient(#c3c3c3 0deg, #cccccc 15deg, #c6c6c6 30deg, #d7d7d7 45deg, #c3c3c3 60deg) 10% 10%;--bronze: repeating-conic-gradient(#d96b41 0deg, #b15a39 15deg, #b25b3a 30deg, #d26645 45deg, #d96b41 60deg) 10% 10%;/*--bronze: repeating-conic-gradient(#d95641 0deg, #b14439 15deg, #b2453a 30deg, #d25645 45deg, #d95641 60deg) 10% 10%;*/--m-gold: #ffcc00;--m-silver: #e9e9e9;--m-bronze: #fb8248/*#ff6f59*/;--ring-clip: polygon(100% 50%, 100% 100%, 0px 100%, 0px 0px, 100% 0px, 100% 50%, 90% 50%, 89.8012% 46.0173%, 89.2069% 42.0742%, 88.2229% 38.2098%, 86.859% 34.4626%, 85.1289% 30.8698%, 83.0496% 27.4672%, 80.6418% 24.2885%, 77.9295% 21.3653%, 74.9396% 18.7267%, 71.7019% 16.399%, 68.2484% 14.4051%, 64.6136% 12.7651%, 60.8336% 11.495%, 56.9459% 10.6077%, 52.9892% 10.1118%, 49.0028% 10.0124%, 45.0263% 10.3104%, 41.0992% 11.0029%, 37.2605% 12.0829%, 33.5485% 13.5398%, 30% 15.359%, 26.6503% 17.5225%, 23.5326% 20.0088%, 20.6779% 22.7931%, 18.1147% 25.8478%, 15.8684% 29.1426%, 13.9612% 32.6447%, 12.4123% 36.3192%, 11.2369% 40.1297%, 10.4468% 44.0383%, 10.0497% 48.0062%, 10.0497% 51.9938%, 10.4468% 55.9617%, 11.2369% 59.8703%, 12.4123% 63.6808%, 13.9612% 67.3553%, 15.8684% 70.8574%, 18.1147% 74.1522%, 20.6779% 77.2069%, 23.5326% 79.9912%, 26.6503% 82.4775%, 30% 84.641%, 33.5485% 86.4602%, 37.2605% 87.9171%, 41.0992% 88.9971%, 45.0263% 89.6896%, 49.0028% 89.9876%, 52.9892% 89.8882%, 56.9459% 89.3923%, 60.8336% 88.505%, 64.6136% 87.2349%, 68.2484% 85.5949%, 71.7019% 83.601%, 74.9396% 81.2733%, 77.9295% 78.6347%, 80.6418% 75.7115%, 83.0496% 72.5328%, 85.1289% 69.1302%, 86.859% 65.5374%, 88.2229% 61.7902%, 89.2069% 57.9258%, 89.8012% 53.9827%, 90% 50%);/*** polygon for the ring by @strangerintheq from stackoverflow: 	https://stackoverflow.com/questions/37000558/clip-path-inset-circle***/
}body {margin: 0;width: 100vw;height: 100vh;
}body * {box-sizing: border-box;
}.container {width: 100vw;height: 100vh;overflow: hidden;position: absolute;left: 0;top: 0;display: flex;justify-content: center;align-items: center;background-image: linear-gradient(11deg, #000000 0%, #2c3e50 75%);perspective: 100vmin;padding-bottom: 10vh;
}.rings {width: 100vmin;display: flex;justify-content: center;align-items: center;transform-style: preserve-3d;transform: rotateY(45deg);animation: spin1 1.75s ease 0s 1, spin2 4.575s ease-in-out 1.75s infinite alternate;position: absolute;
}.rings:hover,
.rings:hover+.rings,
.rings:hover .ring:before {animation-play-state: paused;
}.rings+.rings {filter: drop-shadow(0px 0px 1.5vmin black) brightness(0) blur(1.5vmin) opacity(0.35);animation: shadow1 1.75s ease 0s 1, shadow2 4.575s ease-in-out 1.75s infinite alternate;z-index: -1;
}.ring {width: 30vmin;height: 30vmin;border-radius: 100%;transform: translate3d(-31vmin, -8vmin, 0);transform-style: preserve-3d;position: absolute;box-shadow: 0 0 0.1vmin 0.15vmin var(--metal), 0 0 0.1vmin 0.15vmin var(--metal) inset;
}.ring:before,
.ring:after {content: "";width: 100%;height: 100%;position: absolute;background: radial-gradient(circle at 20% 15%, #ffffffcc 5%, #ffffff40 7%, transparent 13%), radial-gradient(circle at 80% 85%, #ffffffcc 5%, #ffffff40 7%, transparent 13%);border-radius: 100%;animation: shine 5s ease-in-out 2s infinite alternate;transform: rotate(0deg) translate3d(0, 0, 0.1vmin);filter: blur(7px);
}.ring:after {clip-path: var(--ring-clip);background: var(--metal);filter: none;animation: none;transform: translate3d(0, 0, 0.09vmin);
}.ring span {width: 100%;height: 100%;position: absolute;border-radius: 100%;transform: translateZ(-1px);filter: brightness(0.75);background: var(--metal);clip-path: var(--ring-clip);
}.ring:nth-child(2) {transform: translate3d(-15vmin, 8vmin, 0);
}.ring:nth-child(3) {transform: translate3d(0, -8vmin, 0);
}.ring:nth-child(4) {transform: translate3d(16vmin, 8vmin, 0);
}.ring:nth-child(5) {transform: translate3d(31vmin, -8vmin, 0);
}@keyframes spin1 {0% {transform: rotateY(0deg);}100% {transform: rotateY(420deg);}
}@keyframes spin2 {0% {transform: rotateY(60deg);}100% {transform: rotateY(-60deg);}
}@keyframes shadow1 {0% {transform: rotateY(0deg) rotateX(30deg) translateZ(-30vmin) translateY(-10vmin);}100% {transform: rotateY(420deg) rotateX(30deg) translateZ(-30vmin) translateY(-10vmin);}
}@keyframes shadow2 {0% {transform: rotateY(60deg) rotateX(30deg) translateZ(-30vmin) translateY(-10vmin);}100% {transform: rotateY(-60deg) rotateX(30deg) translateZ(-30vmin) translateY(-10vmin);}
}@keyframes shine {0% {transform: rotate(0deg) translate3d(0, 0, 0.1vmin);}100% {transform: rotate(80deg) translate3d(0, 0, 0.1vmin);}
}.ring span:nth-child(1) {transform: translateZ(-1px);
}.ring span:nth-child(2) {transform: translateZ(-2px);
}.ring span:nth-child(3) {transform: translateZ(-3px);
}.ring span:nth-child(4) {transform: translateZ(-4px);
}.ring span:nth-child(5) {transform: translateZ(-5px);
}.ring span:nth-child(6) {transform: translateZ(-6px);
}.ring span:nth-child(7) {transform: translateZ(-7px);
}.ring span:nth-child(8) {transform: translateZ(-8px);
}.ring span:nth-child(9) {transform: translateZ(-9px);
}.ring span:nth-child(10) {transform: translateZ(-10px);
}.ring span:nth-child(11) {transform: translateZ(-11px);
}.ring span:nth-child(12) {transform: translateZ(-12px);
}.ring span:nth-child(13) {transform: translateZ(-13px);
}.ring span:nth-child(14) {transform: translateZ(-14px);
}.ring span:nth-child(15) {transform: translateZ(-15px);
}.ring span:nth-child(16) {transform: translateZ(-16px);
}.ring span:nth-child(17) {transform: translateZ(-17px);
}.ring span:nth-child(18) {transform: translateZ(-18px);
}.ring span:nth-child(19) {transform: translateZ(-19px);
}.ring span:nth-child(20) {transform: translateZ(-20px);filter: none;
}input {display: none;
}label {width: 10vmin;height: 10vmin;position: absolute;z-index: 3;bottom: 8vmin;transform: translateX(calc(50vw - 5vmin));border-radius: 100%;filter: contrast(0.75) sepia(0.65) opacity(0.75);cursor: pointer;text-align: center;font-family: Arial, Helvetica, sans-serif;display: flex;justify-content: center;align-items: center;font-size: 1.5vmin;padding-bottom: 2.5vmin;color: #00000060;transition: all 0.5s ease 0s;font-weight: bold;border: 0.75vmin solid #00000020;
}label:before,
label:after {content: "";width: 1.25vmin;height: 1.25vmin;position: absolute;border-radius: 100%;border: 0.25vmin solid #00000050;filter: drop-shadow(1.85vmin 0 0 black) drop-shadow(0.925vmin 0.75vmin 0 black);margin-left: -3.5vmin;margin-top: 5vmin;
}label:after {filter: none;margin-left: 3.5vmin;
}label[for=gold] {background: var(--gold);box-shadow: 0 0.75vmin 0.1vmin 0 #846900;margin-left: -15vmin;
}label[for=silver] {background: var(--silver);box-shadow: 0 0.75vmin 0.1vmin 0 #808080;
}label[for=bronze] {background: var(--bronze);box-shadow: 0 0.75vmin 0.1vmin 0 #6d2821;margin-left: 15vmin;
}input:checked+label,
input+label:hover {filter: none;transition: all 0.5s ease 0s;border-color: #00000040;transform: translateX(calc(50vw - 5vmin)) translateY(1vmin);box-shadow: 0 0 0.15vmin 0.15vmin #000, -0.5vmin -0.5vmin 1vmin 0vmin #ffffff20, 0.5vmin 0.5vmin 1vmin 0vmin #000000, 0.5vmin 0.5vmin 1vmin 0vmin #000000;
}input#gold:checked~.container {--metal: var(--gold);
}input#gold:checked+label {box-shadow: 0 0 0.15vmin 0.15vmin #000, -0.5vmin -0.5vmin 1vmin 0vmin #ffffff20, 0.5vmin 0.5vmin 1vmin 0vmin #000000, 0.5vmin 0.5vmin 1vmin 0vmin #000000, -0.5vmin -0.5vmin 3vmin 0vmin var(--m-gold);
}input#silver:checked~.container {--metal: var(--silver);
}input#silver:checked+label {box-shadow: 0 0 0.15vmin 0.15vmin #000, -0.5vmin -0.5vmin 1vmin 0vmin #ffffff20, 0.5vmin 0.5vmin 1vmin 0vmin #000000, 0.5vmin 0.5vmin 1vmin 0vmin #000000, -0.5vmin -0.5vmin 3vmin 0vmin var(--m-silver);
}input#bronze:checked~.container {--metal: var(--bronze);
}input#bronze:checked~.container .ring:before {background: radial-gradient(circle at 20% 15%, #ffb8ae82 5%, #ff7b7b40 7%, transparent 13%), radial-gradient(circle at 80% 85%, #ffb8ae82 5%, #ff7b7b40 7%, transparent 13%);
}input#bronze:checked+label {box-shadow: 0 0 0.15vmin 0.15vmin #000, -0.5vmin -0.5vmin 1vmin 0vmin #ffffff20, 0.5vmin 0.5vmin 1vmin 0vmin #000000, 0.5vmin 0.5vmin 1vmin 0vmin #000000, -0.5vmin -0.5vmin 3vmin 0vmin var(--m-bronze);
}@media only screen and (orientation: portrait) {label {width: 20vmin;height: 20vmin;position: absolute;z-index: 3;bottom: 8vmin;transform: translateX(calc(50vw - 10vmin));font-size: 2.5vmin;padding-bottom: 6vmin;}label:before,label:after {content: "";width: 3vmin;height: 3vmin;position: absolute;border-radius: 100%;border: 0.5vmin solid #00000050;filter: drop-shadow(4vmin 0 0 black) drop-shadow(2vmin 2vmin 0 black);margin-left: -8vmin;margin-top: 12vmin;}label:after {filter: none;margin-left: 8vmin;}input:checked+label,input+label:hover {transform: translateX(calc(50vw - 10vmin)) translateY(1vmin);}label[for=gold] {margin-left: -25vmin;}label[for=bronze] {margin-left: 25vmin;}
}

部分HTML代码 :

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>Metal Olympic Rings - Pure CSS</title><link rel="stylesheet" href="css/style.css"><script src="js/prefixfree.min.js"></script></head><body><input type="radio" name="metal" id="gold" checked="checked" /><label for="gold">金牌</label><input type="radio" name="metal" id="silver" /><label for="silver">银牌</label><input type="radio" name="metal" id="bronze" /><label for="bronze">铜牌</label><div class="container"><div class="rings"><div class="ring"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><div class="ring"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><div class="ring"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><div class="ring"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div><div class="ring"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div></div><div class="rings"><div class="ring"></div><div class="ring"></div><div class="ring"></div><div class="ring"></div><div class="ring"></div></div></div></body></html>

源码获取

精彩推荐更新中:

HTML5大作业实战100套

  打卡 文章 更新  36  /  100天

大家可以点赞、收藏、关注、评论我啦 、需要完整文件随时联系我或交流哟~!

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/562103.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【CSDN】-官方插件推荐懒人必备神器

前言&#xff1a; 插件(Plug-in,又称addin、add-in、addon或add-on,又译外挂)是一种遵循一定规范的应用程序接口编写出来的程序。其只能运行在程序规定的系统平台下&#xff08;可能同时支持多个平台&#xff09;&#xff0c;而不能脱离指定的平台单独运行。因为插件需要调用原…

HTML+CSS+JS实现 ❤️3D网状球体动画特效❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; property --color-position {syntax: <length-percentage>;inherits: false;initial-value: 30%; }body {margin: 0;overflow: hidden;--color-position: 30%;background: rad…

怎么读取can报文_【案例】东风天龙“仪表未收到EECU报文”

来呀&#xff01;来呀&#xff01;关注我吧&#xff01;&#xff01; 车辆信息车型东风天龙发动机ISD270 50ECU型号CM2150E尿素泵依米泰克故障现象卡车司机反馈车子跑起来没有力、爬坡无力、仪表上指示灯亮和仪表未收到EECU报文故障排除&#xff1a;检测仪无法进入系…

HTML+CSS+JS实现 ❤️悬挂摇摆的弹珠动画特效❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; 部分HTML代码 : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns"http:…

中如何对一个数取余_如何找到自己在一个城市中的定位?

更多资讯&#xff0c;关注微信公众号&#xff1a;好房U购四川。如何找到自己在一个城市中的定位&#xff1f;最近&#xff0c;各大企业都纷纷启动了校招工作。有条件的&#xff0c;全国都在跑&#xff1b;至少&#xff0c;川内都要跑一跑。而毕业生最迷茫的&#xff0c;不过这两…

HTML+CSS+JS实现 ❤️翻页倒计时ui特效❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; charset "utf-8"; body {background-color: #f2f1ed; }.wrap {position: absolute;bottom: 0;top: 0;left: 0;right: 0;margin: auto;height: 310px; }a {text-decoration…

HTML+CSS+JS实现 ❤️CSS3图片遮罩高亮显示❤️

效果演示&#xff1a; GIF压缩太大、故显示图片查看吧 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; charset "utf-8"; * {margin: 0;padding: 0;list-style: none; }body {background-color: #1B1B1B }img {border: 0;cursor: pointer; }a …

HTML+CSS+JS实现 ❤️响应式图文卡片滑块展示特效❤️

效果演示&#xff1a; 代码目录&#xff1a; 主要代码实现&#xff1a; CSS样式&#xff1a; import url("https://fonts.googleapis.com/css?familyQuicksand:400,500,700&subsetlatin-ext"); html {position: relative;overflow-x: hidden !important; }body…

代码写好了怎么在php里裕兴_8 行代码用Python画一个中国地图

源 / SegmentFaultJupyter首先&#xff0c;第一神器是Jupyter。如果你是第一次使用&#xff0c;可能搞不清楚它的开发者做这么个鬼东西出来干什么&#xff0c;说它是博客系统也不像&#xff0c;说它是web服务器也不像&#xff0c;但它就是有用。因为我们传统的web开发首先想的就…

❤️六W字《计算机基础知识》(三)(建议收藏)❤️

推荐阅读&#xff1a; ❤️《计算机基础知识》&#xff08;一&#xff09;&#xff08;建议收藏&#xff09;❤️ ❤️《计算机基础知识》&#xff08;二&#xff09;&#xff08;建议收藏&#xff09;❤️ ❤️ java项目精品实战案例 ❤️ 101. Internet上&#xff0c;访问We…

源码 状态机_阿里中间件seata源码剖析七:saga模式实现

saga模式是分布式事务中使用比较多的一种模式&#xff0c;他主要应用在长流程的服务&#xff0c;对一个全局事务&#xff0c;如果某个节点抛出了异常&#xff0c;则从这个节点往前依次回滚或补偿事务。今天我们就来看看它的源码实现。状态机初始化在之前的文章《springcloudeur…

❤️六W字《计算机基础知识》(四)(建议收藏)❤️

151. www.cernet.edu.cn 的网址中&#xff0c;可以明确地看出是属于哪一类机构____。 A、教育界 B、政府单位 C、法人组织 D、公司 152. 在Wed网页中指向其他网页的‘指针“称之为____。 A、超链接 B、超文本 C、超媒体 D、多媒体 153. 下列关于URL的解释错误的是____。…

❤️六W字《计算机基础知识》(五)(建议收藏)❤️

客户/服务器模式的局域网&#xff0c;其网络硬件主要包括服务器、工作站、网卡和____。 A、网络拓扑结构 B、计算机 C、传输介质 D、网络协议 和广域网相比&#xff0c;局域网____。 A、有效性好但可靠性差 B、有效性差但可靠性高 C、有效性好可靠性也高 …

唯有自己变得强大_唯有自己变得强大,才能获得有用人脉!

孔子说&#xff1a;不患人之莫知己&#xff0c;求为可知也来源&#xff1a;田俊国课堂对初入职场的人来讲人微言轻&#xff0c;即便使出浑身解数去拓展关系&#xff0c;有权力、有地位的人也未必正眼瞧你。全世界的人都想巴结那些炙手可热的有权力、有资源的名人。问题是&#…

❤️六W字《计算机基础知识》(六)(建议收藏)❤️

FTP是因特网上最早使用的文件传输程序&#xff0c;使用FTP不能____。 A、查看文件 B、文件目录操作 C、下载文件 D、运行文件 WWW是一种建立在Internet上的全球性的、交互的、动态、多平台、分布式的图形信息系统&#xff0c;它的…

android sdk方法隐藏_每个Android开发都必须知道的利器

1.背景介绍在移动端项目功能不断完善和丰富的过程中我们一直在寻找一种可以高效开发且复用率高的开发模式&#xff0c;特别是多应用同步开发、管理。在开发过程中你是否遇到需要发布影子工程&#xff1f;新建项目是否需要耗费大量时间将原有基类、工具类、第三方通用类库逐个 c…

❤️六W字《计算机基础知识》(七)(建议收藏)❤️

在Word中&#xff0c;对某个段落的全部文字进行下列设置&#xff0c;属于段落格式设置的是____。 A、设置为四号字 B、设置为楷体字 C、设置为1.5倍行距 D、设置为4磅字间距 用Word编辑文件时&#xff0c;用户可以设置文件的自动保存时间间隔。如果改变自动保存时…

flash 火狐总是崩溃_win10系统火狐flash插件总是崩溃的解决方法

win10系统火狐flash插件总是崩溃的问题发生概率较高。怎样来处理win10系统火狐flash插件总是崩溃的问题&#xff0c;知道的人估计不多。本站针对win10系统火狐flash插件总是崩溃的情况总结了一些解决的方法。简单说两步&#xff1a;1、在火狐浏览器地址栏在输入&#xff1a;abo…

❤️六W字《计算机基础知识》(八)(建议收藏)❤️

在Word中替换的快捷键是____。 A、CTRLF B、CTRLH C、CTRLS D、CTRLP 在Word中打印的快捷键是____。 A、CTRLF B、CTRLH C、CTRLO D、CTRLP 在Word中打开新文档的快捷键是____。 A、CTRLF B、CTRLH C、CTRLO D、CTRLP 在Word中&#xff0c;___最大。 A、初…

s3vm与tritraining_S3FD论文解读

论文题目&#xff1a;S3FD: Single Shot Scale-invariant Face DetectorS$^3$FD: Single Shot Scale-invariant Face Detector​arxiv.orgsfzhang15/SFD​github.com作者团队&#xff0c;来自于中科院自动化所(CASIA)&#xff0c;一作Shifeng Zhang(张士峰)&#xff0c;看见没&…