js实现鼠标光照文字阴影交互立体动画效果代码

代码语言:html

所属分类:动画

代码描述:js实现鼠标光照文字阴影交互立体动画效果代码

代码标签: js 鼠标 光照 文字 阴影 交互 立体 动画

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  
<style>
body {
	background: #000;
	font-family: sans-serif;
	min-height: 100vh;
	margin: 0;
}

.overlay {
	background: #444;
	color: #fff;
	left: 0;
	top: 0;
	right: 0;
	min-height: 100%;
	position: absolute;
	padding-bottom: 5em;
}

.gradient {
	position: fixed;
	width: 200vw;
	height: 400vh;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background-image: radial-gradient(circle, white, white 1%, #000e 20%);
	pointer-events: none;
	z-index: 1;
	mix-blend-mode: multiply;
}

h1 {
	font-size: min(15vmin, 42pt);
	width: 4em;
	text-align: center;
	margin: 1em auto;
	margin-top: 33vh;
	transform: scaleY(2);
	transform-origin: bottom;
	color: #a55;
}

.overlay > p,
.overlay > blockquote,
.overlay > ul,
.overlay > hr {
	width: min(800px, 80%);
	margin: 1em auto;
}

blockquote {
	padding: 1em;
	margin-left: 1em;
	background: #fab3;
	border-left: 2px #afb4 solid;
}

.fish:after {
	content: "🐟";
	position: fixed;
	right: 0.5em;
	bottom: 0.5em;
	z-index: 99;
	font-size: 30pt;
}
</style>


  
</head>

<body translate="no">
  <h1 class="wall-bottom">Umbra</h1>
<p>Move your mouse .........完整代码请登录后点击上方下载按钮下载查看

网友评论0