div+css实现钢铁侠之心旋转动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现钢铁侠之心旋转动画效果代码

代码标签: div css 钢铁侠 之心 旋转 动画

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

<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<style>
		    * {
	/* 初始化 清除页面元素的内外边距 */
	padding: 0;
	margin: 0;
}
body {
	/* 弹性布局 让页面元素垂直+水平居中 */
	display: flex;
	justify-content: center;
	align-items: center;
	/* 让页面始终占浏览器可视区域高度 */
	height: 100vh;
	/* 背景颜色 径向渐变 */
	background: radial-gradient(#353c44, #222931);
}
/* 定义一下几个盒子相同的部分 */
.circle {
	/* 圆形 */
	border-radius: 50%;
}
.center {
	position: absolute;
	top: 50%;
	left: 50%;
	/* 元素走自身高度/宽度 的一半 */
	transform: translate(-50%, -50%);
}
.container {
	/* 相对定位 */
	position: relative;
	width: 300px;
	height: 300px;
	border: 1px solid rgb(18, 20, 20);
	background-color: #384c50;
	/* 盒子阴影 默认是外部阴影 写了inset 就是内部阴影 */
	box-shadow: 0 0 32px 8px rgb(18, 20, 20), 0 0 4px 1px rgb(18, 20, 20) inset;
}
.container .box1 {
	width: 238px;
	height: 238px;
	background-color: rgb(22, 26, 27);
	box-shadow: 0 0 4px 1px #52fefe;
}
.container .box2 {
	width: 220px;
	height: 220px;
	background-color: #fff;
	box-shadow: 0 0 5px 1px #52fefe, 0 0 5px 4px #52fefe inset;
}
.container .box3 {
	width: 180px;
	height: 180px;
	bac.........完整代码请登录后点击上方下载按钮下载查看

网友评论0