插件预览图

使用教程

代码展示

vue页面使用

Style

.space {

width: 100%;

height: 100vh;

background: #121212;

overflow: hidden;

}

.planet {

width: 150px;

height: 150px;

border-radius: 50%;

background: #333;

position: absolute;

left: 50%;

top: 50%;

margin: -75px 0 0 -75px;

overflow: hidden;

z-index: 2;

}

.planet_shadow {

position: absolute;

border-radius: 50%;

height: 100%;

width: 100%;

top: -40%;

right: -10%;

border: 35px solid rgba(0, 0, 0, .15);

}

.crater1,

.crater2,

.crater3,

.crater4 {

position: absolute;

border-radius: 50%;

background: rgba(0, 0, 0, .3);

box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .2);

}

.crater1 {

width: 20px;

height: 20px;

left: 25%;

top: 20%;

}

.crater2 {

width: 10px;

height: 10px;

left: 50%;

top: 60%;

}

.crater3 {

width: 15px;

height: 15px;

left: 30%;

top: 65%;

}

.crater4 {

width: 15px;

height: 15px;

left: 60%;

top: 35%;

}

.star {

display: block;

width: 5px;

height: 5px;

border-radius: 50%;

background: #FFF;

top: 100px;

left: 400px;

position: relative;

transform-origin: 100% 0;

animation: star-ani 6s infinite ease-out;

box-shadow: 0 0 5px 5px rgba(255, 255, 255, .3);

opacity: 0;

z-index: 2;

}

.star:after {

content: '';

display: block;

top: 0px;

left: 4px;

border: 0px solid #fff;

border-width: 0px 90px 2px 90px;

border-color: transparent transparent transparent rgba(255, 255, 255, .3);

transform: rotate(-45deg) translate3d(1px, 3px, 0);

box-shadow: 0 0 1px 0 rgba(255, 255, 255, .1);

transform-origin: 0% 100%;

animation: shooting-ani 3s infinite ease-out;

}

.pink {

top: 30px;

left: 395px;

background: #ff5a99;

animation-delay: 5s;

-webkit-animation-delay: 5s;

-moz-animation-delay: 5s;

}

.pink:after {

border-color: transparent transparent transparent #ff5a99;

animation-delay: 5s;

-webkit-animation-delay: 5s;

-moz-animation-delay: 5s;

}

.blue {

top: 35px;

left: 432px;

background: cyan;

animation-delay: 7s;

-webkit-animation-delay: 7s;

-moz-animation-delay: 7s;

}

.blue:after {

border-color: 'transpareanimation-delay: 12s';

-webkit-animation-delay: 7s;

-moz-animation-delay: 7s;

animation-delay: 7s;

}

.yellow {

top: 50px;

left: 600px;

background: #ffcd5c;

animation-delay: 5.8s;

}

.yellow:after {

border-color: transparent transparent transparent #ffcd5c;

animation-delay: 5.8s;

}

@keyframes star-ani {

0% {

opacity: 0;

transform: scale(0) rotate(0) translate3d(0, 0, 0);

-webkit-transform: scale(0) rotate(0) translate3d(0, 0, 0);

-moz-transform: scale(0) rotate(0) translate3d(0, 0, 0);

}

50% {

opacity: 1;

transform: scale(1) rotate(0) translate3d(-200px, 200px, 0);

-webkit-transform: scale(1) rotate(0) translate3d(-200px, 200px, 0);

-moz-transform: scale(1) rotate(0) translate3d(-200px, 200px, 0);

}

100% {

opacity: 0;

transform: scale(1) rotate(0) translate3d(-300px, 300px, 0);

-webkit-transform: scale(1) rotate(0) translate3d(-300px, 300px, 0);

-moz-transform: scale(1) rotate(0) translate3d(-300px, 300px, 0);

}

}

兼容性

全平台兼容

html设置流星动态背景,纯CSS流星雨背景相关推荐

  1. html流星雨页面,纯CSS流星雨背景的示例代码

    插件预览图 使用教程代码展示 vue页面使用 Style .space { width: 100%; height: 100vh; background: #121212; } .planet { w ...

  2. 纯CSS实现背景渐变、球和阶梯的跳动

    纯CSS实现背景渐变.球和阶梯的跳动 作者:马光佳 撰写时间:2019.1.17 开发工具与关键技术:MicrossftVisualStudio.animation与@keyframes的配合使用 背 ...

  3. 纯css实现背景颜色渐变动画

    纯css实现背景颜色渐变动画,代码及效果图如下. body {width: 100wh;height: 100vh;color: #fff;background: linear-gradient(-4 ...

  4. 纯CSS 红砖背景墙

    theme: smartblue 持续创作,加速成长!这是我参与「掘金日新计划 · 6 月更文挑战」的第5天,点击查看活动详情 本文简介 点赞 + 收藏 + 关注 = 学会了 先上图看看效果再介绍 我 ...

  5. html怎么画3角型当背景,纯CSS画三角原理解析

    纯CSS画三角原理解析 因为之前做一个页面出现了很多三角,开始直接用图片感觉并不是很好用,看着总是怪怪的颜色还很难调整的跟背景一样,就搜了一波代码直接用上了,事后想了一下感觉不知道具体原理是什么,很奇 ...

  6. 纯css实现背景图片半透明,内容不透明

    前言 最近做一个登陆界面的,突然想使用这种背景图片透明,而内容不透明的效果,这里我就说一说我的两个思路吧. 效果展示 半透明 不透明 常见的失败做法 最常见的做法事设置元素的opacity,这种设置出 ...

  7. css怎么分开背景图片,css切背景图片(background-position)

    给元素添加背景图片的方式有很多,个人总结的有: 用img插入图片: css3的方式手动绘图: 单独用background-image单独插入图片: 其中用background-image有两种方法,一 ...

  8. php怎么加css和背景图,css的背景图怎么加边框

    css背景图加边框的方法:首先创建一个HTML示例文件:然后通过"background-image"引入一张背景图:最后通过border属性设置边框即可. 本文操作环境:windo ...

  9. antd 设置表头属性_纯css实现固定表头和锁定列

    ### table 表格是一个网站很常用的元素,用以展示大量的数据.在处理表格时,通常会加入许多功能,如斑马线.选中高亮.固定表头.锁定列等等,本篇文章主要介绍如何单纯的使用css实现固定行或列的功能 ...

最新文章

  1. java初始化一个链表_Java 链表(LinkNode)的简单操作:初始化,遍历,插入,删除等...
  2. SQL Server 2005 在建立与服务器的连接时出错,错误26收藏
  3. erc20 php,使用php将erc20令牌从一个帐户传输到另一个帐户
  4. mysql插入数据与删除重复记录的几个例子(收藏)
  5. Linux实操篇——实用指令学习笔记(详解)
  6. sql两个in并列_SQL窗口函数
  7. 机器学习算法总结之Boosting:Boosting Tree、GBDT
  8. validate中remote的用法
  9. window7 右键菜单显示-》在此处打开命令窗口
  10. 成也萧何,败也萧何---PIG JOIN 的replicated
  11. java 模板生成pdf文件
  12. Wincc声音报警简单方法
  13. SQL练习题:变更性别
  14. C# WinForm GUI之控件
  15. 怀旧服显示已从服务器断开连接,魔兽世界怀旧服服务器进不去排队怎么办 服务器断开连接解决方法技巧分享...
  16. 将maximo工具栏图标放置在正上方
  17. Simulink三相异步电机仿真(1)
  18. c语言free函数的作用,c语言中free函数的理解
  19. 三维CAD软件项目即将验收 3D打印获突破
  20. 洛谷P3667 [USACO17OPEN]Bovine Genomics G 动态规划

热门文章

  1. Python 视频爬取与存储
  2. iText5使用绝对定位制作pdf打印针式发票,支持跳页
  3. Spring IOC原理 Bean标签解析和Definition封装
  4. 陈大惠老师:sq泛滥对现代人的伤害
  5. FPGA验证学习(五):SoC的总线架构
  6. 认识计算机网络教学设计,(完整版)1.1认识计算机网络-教学设计
  7. 附下载 | ISACA发布《2023年度隐私实践研究报告》,人才短缺形势依然严峻
  8. 我心目中的计算机英语课,教学反思我心目中的英语常态课
  9. 软件工程期末展示材料——RUC自习助手
  10. 【文章转载】- 微信小程序域名收集工具