js实现文字螺旋式布局旋转效果代码

代码语言:html

所属分类:布局界面

代码描述:js实现文字螺旋式布局旋转效果代码

代码标签: js 文字 螺旋式 布局 旋转

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

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

<head>
  <meta charset="UTF-8">
  

  
  
<style>
body {
	display: grid;
	height: 100dvh;
	margin: 0;
}

.outer {
	position: relative;
	max-height: 80dvh;
	max-width: 80dvh;
	margin: auto;
	border: 2px solid #000;
	visibility: hidden;
	overflow: hidden;
	font: bold 12px sans-serif;
	box-shadow: -20px 20px 60px #bebebe, 20px -20px 60px #ffffff;
	background: #f8f8f8;
}

.inner {
	position: absolute;
	top: 50%;
	left: 50%;
	animation: spin 360s infinite linear;
}

span {
	position: absolute;
}

@keyframes spin {
	from {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}
</style>

  
</head>

<body >
  <div class="outer">
  <div class="inner">
    spiral out - keep going
  </div>
</div>
  
      <script id="rendered-js" >
const CONTAINER_SIZE = 540;
const SKIP_FIRST_N = 8;
const LINE_SPACING = 7;
const CHARACTER_SPACING = 5;
const ROTATION_JITTER = 0.3;

const out.........完整代码请登录后点击上方下载按钮下载查看

网友评论0