div+css实现自适应响应式带动画的时间轴大事记效果代码
代码语言:html
所属分类:响应式
代码描述:div+css实现自适应响应式带动画的时间轴大事记效果代码
代码标签: div css 自适应 响应式 动画 时间轴 大事记
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap");
/* Global styles */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
/* Body styling */
body {
background: #212529;
height: 100vh;
display: grid;
place-items: center;
font-family: "Nunito Sans", sans-serif;
}
/* Timeline container styling */
.timeline-container {
display: flex;
gap: 33.5px;
width: 100%;
height: 134px;
justify-content: center;
font-weight: 900;
font-size: 67px;
}
/* Individual timeline point styling */
.timeline-point {
transition-duration: 0.5s;
border-radius: 50%;
background: linear-gradient(145deg, #1e2125, #23282c);
box-shadow: 13.4px 13.4px 40.2px #1c1f23, -13.4px -13.4px 40.2px #262b2f;
display: grid;
place-items: center;
width: 134px;
position: relative;
color: var(--color);
}
.timeline-point::before {
content: "";
width: 200px;
height: 200px;
z-index: -1;
border-radius: 50%;
position: absolute;
background: conic-gradient(
var(--color) var(--angle),
transparent 0deg 360deg
);
-webkit-animation: rotateBorder 1s linear var(--delay) forwards;
animation: rotateBorder 1s linear var(--delay) forwards;
}
.timeline-point:nth-child(odd)::before {
transform: rotate(-90deg);
}
.timeline-point:nth.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0