当前位置:网站首页>全屏数字预加载动画
全屏数字预加载动画
2022-08-06 08:18:00 【JiuMeilove】
效果图
代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>全屏数字计时预加载</title>
<style> body {
margin: 0; padding: 0; font-family: sans-serif; } .loader {
position: absolute; top: 0; left: 0; height: 100%; background-color: #000; } section {
position: absolute; top: 0; left: 0; width: 100%; height: 100vh; background-color: #fff; pointer-events: none; animation: fadeout .5s linear forwards; animation-delay: 11s; } @keyframes fadeout {
from {
opacity: 1; } to {
opacity: 0; } } .count {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18vw; color: #fff; font-weight: 800; mix-blend-mode: difference; width: 550px; text-align: right; } .welcome {
position: absolute; top: 0; left: 0; width: 100%; height: 100vh; display: flex; justify-content: center; align-items: center; color: #fff; } h2 {
margin: 0; padding: 0; font-size: 10vw; color: #000; } </style>
</head>
<body>
<div class="welcome">
<h2>welcome</h2>
</div>
<section>
<div class="loader"></div>
<div class="count"></div>
</section>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script> $(document).ready(() => {
var count = 0; var counter = setInterval(() => {
if (count < 1001) {
$('.count').text(Math.round(count / 10) + '%') $('.loader').css('width', count / 10 + '%') count++ } else {
clearInterval(counter) } }, 10); }) </script>
</body>
</html>
边栏推荐
- 如何提高文章质量,不被发文助手“推荐受影响”
- LeetCode - 345. The reversal in the string vowels
- C language force buckle the 59th spiral matrix ②.analog matrix
- [科普文] 搞 Web3 要学习哪些基础知识?
- ErrorCode 1045, the state 28000 error, rounding the solution
- 模拟实现strcpy函数的实现(含多次优化思想)
- 在多核异构SoC平台上进行软件开发
- 需要具备哪些能力,才能算得上是一个合格的软件测试工程师...
- 【基于simulink的二阶电路仿真】
- Dataset: A detailed guide to the introduction, download, and usage of the heart disease dataset
猜你喜欢

C language force buckle the 59th spiral matrix ②.analog matrix

Can the code signing certificate solve the software being alerted by antivirus software?

使用aggird组件实现下滑请求分页从而实现无限滚动的效果

I set the global mapping table prefix in yml, but the database does not recognize it

How to ensure the security of NFT from the suspected abolition of the magic core

2022-08-05: What does the following go code output?A: 65, string; B: A, string; C: 65, int; D: error.

Autumn begins tomorrow, the weather is getting cooler

石原子科技正式加入openGauss社区

【手机】手机选购指南

Simulate the realization of strcpy function (including multiple optimization ideas)
随机推荐
How much is a code signing certificate?
CPU Architecture at a Glance
山石发声 | 做好安全运营,没有你想象的那么难
【FirmAE论文节译】FirmAE: Towards Large-Scale Emulation of IoT Firmware for Dynamic Analysis
Ceph性能测试方案收集列表
LeetCode - 345. The reversal in the string vowels
深度学习——以花朵识别为例,分析构造神经网络时用到的各个类构造函数(Dense、Conv2D、Flatten等)
剑指 Offer 15. 二进制中1的个数,位运算,与运算
QianBase Operation and Maintenance Practical Commands
TiDB | 来说说TiEM初体验吧
qwqの科技flag
MySQL数据库 优化
UNIX环境高级编程-第一章
yum离线安装
Day020 方法重写与多态
Chapter 13 贝叶斯网络实践
selenium4.0以上元素被定位
Program development that runs the game is prohibited
typescript变量
JMeter集合点