js+css实现一碗字母汤loading加载动画效果代码

代码语言:html

所属分类:加载滚动

代码描述:js+css实现一碗字母汤loading加载动画效果代码

代码标签: js css 一碗 字母 汤l oading 加载 动画

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

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

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

  <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Gluten:wght@600&amp;display=swap'>
  
<style>
:root {
	--title: "Alphabet Soup Loader";
	--author: "Matt Cannon";
	--contact: "mc@mattcannon.design";
	--description: "An animated loading screen featuring alphabet soup that cleverly transforms 'LOADING' to 'LOADED' by sinking letters into the soup and surfacing new ones with realistic bubbling effects.";
	--keywords: "loading animation, alphabet soup, css animation, javascript, creative loader, interactive design, web animation, food theme, playful ui, letter animation, soup simulation, canvas effects, modern loading screen, engaging ux";
	--last-modified: "2025-05-22";
	--content-language: "en";
	--generator: "HTML5, CSS3, Javascript, Canvas API, Web Animations API";
}

body,
html {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	background: url("//repo.bfw.wiki/bfwrepo/image/67d76faf0f8f6.png")
		center/cover no-repeat;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}
.container {
	width: 320px;
	height: 320px;
	position: relative;
}
.soup-bowl {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: white;
	border: 0.1vmin solid white;
	box-shadow: white 0 0 0 2vmin, rgba(0, 0, 0, 0.1) 5px 5px 30px inset,
		rgba(0, 0, 0, 0.05) -5px -5px 30px inset;
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
}
.soup {
	width: 83%;
	height: 83%;
	background: #cc5a2f;
	border-radius: 50%;
	position: relative;
	box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.25),
		inset 0 -4px 10px rgba(255, 255, 255, 0.1);
	overflow: hidden;
}
.soup-wave {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}
.loading-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: inline-flex;
	align-items: flex-end;
	z-index: 3;
	transition: transform 2s ease-out;
}
.char {
	display: inline-block;
	font-family: "Gluten", sans-serif;
	font-size: 26px;
	color: #f5d78e;
	text-transform: uppercase;
	pointer-events: none;
	marg.........完整代码请登录后点击上方下载按钮下载查看

网友评论0