欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 房产 > 家装 > 【css酷炫效果】纯CSS实现虫洞穿越效果

【css酷炫效果】纯CSS实现虫洞穿越效果

2025/3/22 4:31:38 来源:https://blog.csdn.net/u011561335/article/details/146322968  浏览:    关键词:【css酷炫效果】纯CSS实现虫洞穿越效果

【css酷炫效果】纯CSS实现穿越效果

  • 创作背景
  • html结构
  • css样式
  • 完整代码
    • 基础版
    • 进阶版(虫洞穿越)
  • 效果图

想直接拿走的老板,链接放在这里:https://download.csdn.net/download/u011561335/90491973

创作随缘,不定时更新。

创作背景

刚看到csdn出活动了,赶时间,直接上代码。

html结构

<div class="text"></div>

css样式

body, html {margin: 0;padding: 0;height: 100%;overflow: hidden;display: flex;justify-content: center;align-items: center;background-color: #c9b0b0; /* 背景颜色 */
}.text {position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));animation: curtainWave 1s infinite;
}@keyframes curtainWave {0% {transform: scale(0);opacity: 1;}100% {transform: scale(2);opacity: 0;}
}

完整代码

基础版

<!DOCTYPE html>
<html lang="en"> 
<head><title>页面特效</title>
<style type="text/css">
body, html {margin: 0;padding: 0;height: 100%;overflow: hidden;display: flex;justify-content: center;align-items: center;background-color: #c9b0b0; /* 背景颜色 */
}.text {position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));animation: curtainWave 1s infinite;
}@keyframes curtainWave {0% {transform: scale(0);opacity: 1;}100% {transform: scale(2);opacity: 0;}
}
</style></head>
<body><div class="text"></div></body>
</html>

进阶版(虫洞穿越)

<!DOCTYPE html>
<html lang="en"> 
<head><title>页面特效</title>
<style type="text/css">
body, html {margin: 0;padding: 0;height: 100%;overflow: hidden;display: flex;justify-content: center;align-items: center;background-color: #c9b0b0; /* 背景颜色 */
}.text {border-radius: 100%;position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));animation: curtainWave 1s infinite;
}@keyframes curtainWave {0% {transform: scale(0);opacity: 1;}100% {transform: scale(2);opacity: 0;}
}
</style></head>
<body><div class="text"></div></body>
</html>

效果图

在这里插入图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词