红绿灯交通灯动画效果

代码语言:html

所属分类:动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
  @import url('https://fonts.googleapis.com/css?family=Muli&display=swap');

* {
	box-sizing: border-box;
}

body {
	background-color: #1abc9c;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	margin: 0;
}

.container {
	background-color: #2c3e50;
	border-radius: 50px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-around;
	padding: 15px 0;
	height: 200px;
	width: 70px;
}

.circle {
	background-color: rgba(0, 0, 0, 0.3);
	border-radius: 100%;
	position: relative;
	height: 40px;
	width: 40px;
}

.circle::after {
	border-right: 4px solid rgba(255, 255, 255, 0.6);
	border-radius: 100%;
	content: ' ';
	position: absolute;
	top: 5p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0