Skip to content
项目

关于

使用纯 CSS 实现动态背景渐变。

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Auroral - Animated background gradients

Auroral is a collection of animated background gradients, that can be used almost anywhere. They are built with pure CSS. To learn how it works, read the article.

Demo

You can test all effects on the Auroral demo page.

#How to use

  1. Include a container for a background inside a wanted element. It needs to have one of the auroral classes.

    <section class="your-container">
      <div class="auroral-northern"></div>
    </section>
    
  2. In the head of your html file, add auroral stylesheet. Of course, you can add minified version instead.

    <head>
      <link rel="stylesheet" type="text/css" href="css/auroral.css"/>
    </head>
    

    Or:

    <head>
      <link rel="stylesheet" type="text/css" href="css/auroral.min.css"/>
    </head>
    
  3. Make sure, that your container (the one in which you put the auroral container) has these rules in CSS:

    .your-container {
      display: block; // if it is not a block element
      position: relative;
      overflow: hidden;
    }
    

Stars!

What is a night sky without the stars? Add them by appending an element with the auroral-stars class right after the auroral container:

  <section class="your-container">
    <div class="auroral-northern"></div>
    <div class="auroral-stars"></div>
  </section>

If you know how to use Sass you can play with the $star-number variable, to make sure there is a right amount of them! It sits in _stars.scss partial.

#Backgrounds

Currently available backgrounds (class names to be used in your container):

License

The library is licensed under The MIT License (MIT).

Go to Lunar Logic website to learn more about us and our work.

探索相关项目

加载中…