three实现三维虫洞穿越动画效果代码

代码语言:html

所属分类:三维

代码描述:three实现三维虫洞穿越动画效果代码

代码标签: three 三维 虫洞 穿越 动画

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

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

<head>
  <meta charset="UTF-8">
  
  
  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Unica+One&amp;display=swap'>
  
<style>
:root {
	--title: "Cyberspace Portal";
	--author: "Matt Cannon";
	--contact: "mc@mattcannon.design";
	--description: "An interactive card featuring a mesmerizing glow effect that invites you to enter a portal. Once activated, you are unexpectedly sucked into the matrix, traveling through a digital tunnel filled with floating code snippets and particles, immersing you in a journey through cyberspace.";
	--keywords: "card glow, portal, interactive card, box-shadow, 3D tunnel, Three.js, animation, CSS animation, JavaScript animation, particle effects, glowing effects, codepenchallenge, cpc-card-glow, immersive web experience";
	--last-modified: "2025-04-15";
	--content-language: "en";
	--generator: "HTML5, CSS3, JavaScript, Three.js, requestAnimationFrames,";
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	overflow: hidden;
	background: url("")
		no-repeat center center fixed;
	background-size: cover;
	background-color: #0a0a0a;
	font-family: "Unica One", sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
	position: relative;
	perspective: 2000px;
}
#portalCard {
	position: absolute;
	width: 300px;
	height: 350px;
	background: rgba(10, 12, 18, 0.6);
	backdrop-filter: blur(10px);
	border-radius: 20px;
	border: 1px solid rgba(0, 255, 170, 0.8);
	box-shadow: 0 0 30px rgba(0, 255, 170, 0.5), 0 0 50px rgba(0, 179, 255, 0.3),
		inset 0 0 20px rgba(0, 255, 170, 0.2);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: all 2.2s cubic-bezier(0.1, 1, 0.1, 1);
	z-index: 10;
	overflow: hidden;
	transform-style: preserve-3d;
	position: relative;
	transform: scale(0.85);
}
#portalCard::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 19px;
	padding: 1px;
	background: linear-gradient(135deg, #00ffaa, #00a3ff);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0.9;
	transition: opacity 1.5s ease;
	z-index: 2;
	box-shadow: 0 0 20px rgba(0, 255, 170, 1);
}
#portalCard::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
	background: linear-gradient(
		135deg,
		rgba(0, 255, 170, 0.15) 0%,
		rgba(0, 179, 255, 0.15) 100%
	);
	opacity: 0.5;
	z-index: 1;
}
.gooey-effect {
	position: absolute;
	inset: 0;
	border-radius: 20px;
	overflow: hidden;
	z-index: 0;
	opacity: 0.9;
	filter: blur(2px);
}
.gooey-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(12px);
	animation: float-blob 15s infinite ease-in-out;
	opacity: 0.9;
}
.gooey-blob:nth-child(1) {
	width: 250px;
	height: 250px;
	left: -50px;
	top: 100px;
	background: radial-gradient(
		circle,
		rgba(0, 255, 170, 0.7) 0%,
		rgba(0, 255, 170, 0) 70%
	);
	animation-duration: 8s;
}

.gooey-blob:nth-child(2) {
	width: 200px;
	height: 200px;
	right: -30px;
	top: 50px;
	background: radial-gradient(
		circle,
		rgba(0, 179, 255, 0.7) 0%,
		rgba(0, 179,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0