1. Webkit引擎的CSS3径向渐变语法
        Webkit引擎下的老版本语法:-webkit-gradient([<type>],[<position> || <angle>,]?[<shape> ||<size>,]?<color-stop>,<color-stop>[,<color-stop>]*); //Safari Chrome这两款浏览器支持的版本,浏览器Chrome4-9 和Safari4-5版本支持
        Webkit引擎新式语法:-webkit-radial-gradient([<position> || <angle>,]?[<shape> || <size>,]?<color-stop>,<color-stop>[,<color-stop>]*);//Safari Chrome这两款浏览器支持的版本,Chrome10.0+和Safari5.1+支持

2. Gecko引擎的CSS3的径向渐变语法
        -moz-radial-gradient([<position> || <angle>,]?[<shape> || <size>,]?<color-stop>,<color-stop>[,<color-stop>]*); //Firefox浏览器支持的版本
        Gecko引擎的Firefox浏览器中Firefox3.6+版本支持径向渐变。

3. Presto引擎的CSS3径向渐变语法
        -o-radial-gradient([<position> || <angle>,]?[<shape> || <size>,]?<color-stop>,<color-stop>[,<color-stop>]*);        //Opera浏览器支持的版本
        Presto引擎中的Opear11.6开始支持径向渐变。

4. Trident引擎的CSS3径向渐变语法
        -ms-radial-gradient([<position> || <angle>,]?[<shape> || <size>,]?<color-stop>,<color-stop>[,<color-stop>]*); //IE10以上的版本

5. W3C标准径向渐变语法
        radial-gradient([[<shape> || <size>] [at <position>]?,| at <position>,]?<color-stop>[,<color-stop>]+); //标准径向渐变

.linear{

width:100%;

height:600px;

FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#b8c4cb,endColorStr=red);  /*IE 6 7 8*/

background: -ms-linear-gradient(top, #fff,  #0000ff);        /* IE 10 */

background: -moz-linear-gradient(top,#b8c4cb,#f6f6f8);/*火狐*/

background: -webkit-gradient(linear, 0% 0%, 0% 100%,from(#b8c4cb), to(#f6f6f8));/*谷歌*/

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#0000ff));      /* Safari 4-5, Chrome 1-9*/

background: -webkit-linear-gradient(top, #fff, #0000ff);   /*Safari5.1 Chrome 10+*/

background: -o-linear-gradient(top, #fff, #0000ff);  /*Opera 11.10+*/

}

流星效果

safari和ie9以下无效

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>meteor</title>
<style>
*{
padding:0;
margin:0;
}
body{
background-color:#000;
overflow:hidden;
}
.author{
color:#fff;
font:18px/1.5 "微软雅黑";
animation:change 4s infinite;
}
.star{
width:4px;
height:4px;
background-color:#fff;
display:block;
position:absolute;
top:110px;
right:800px;
border-radius:4px;
animation:star 1s infinite linear;
opacity:0;
}
.star:after{
position:relative;
display:block;
top:-49px;
left:23px;
border:2px solid #fff;
border-width:0 0 0 1px;
width:100px;
height:100px;
content:"";
transform:rotate(45deg);
}
.blue{
background-color:lightskyblue;
top:60px;
right:600px;
animation-delay:0.25s;
}
.blue:after{
width:200px;
height:200px;
top:-99px;
left:43px;
border:2px solid lightskyblue;
border-width:0 0 0 1px;
}
.pink{
background-color:lightpink;
top:160px;
right:500px;
animation:starPink 1s infinite linear;
animation-delay:0.5s;
}
.pink:after{
width:133px;
height:133px;
top:-65px;
left:29px;
border:2px solid lightpink;
border-width:0 0 0 1px;
}
.yellow{
background-color:yellow;
top:127px;
right:261px;
animation:starYellow 1s infinite linear;
animation-delay:0.75s;
}
.yellow:after{
width:209px;
height:164px;
top:-65px;
left:29px;
border:2px solid yellow;
border-width:0 0 0 1px;
}
@keyframes change{
0%{
color:#fff;
}
25%{
color:lightskyblue;
}
50%{
color:lightpink;
}
75%{
color:yellow;
}
}
@keyframes star{
0%{
opacity:0;
transform:scale(0) translate(0,0);
}
50%{
opacity:1;
transform:scale(1) translate(-200px,200px);
}
100%{
opacity:0;
transform:scale(1) translate(-400px,400px);
}
}
@keyframes starPink{
0%{
opacity:0;
transform:scale(0) translate(0,0);
}
50%{
opacity:1;
transform:scale(1) translate(-300px,300px);
}
100%{
opacity:0;
transform:scale(1) translate(-600px,600px);
}
}
@keyframes starYellow{
0%{
opacity:0;
transform:scale(0) translate(0,0);
}
50%{
opacity:1;
transform:scale(1) translate(-300px,300px);
}
100%{
opacity:0;
transform:scale(1) translate(-600px,600px);
}
}
</style>
</head>
<body>
<span class="author">by Scott</span>
<span class="star"></span>
<span class="star blue"></span>
<span class="star pink"></span>
<span class="star yellow"></span>
</body>
</html>

关于css3背景图片渐变的规则的更多相关文章

  1. css3背景颜色渐变属性 兼容性测试基础环境为:windows系统;IE6.0+, Firefox4.0+, Chrome4.0+, Safari4.0+, Opera15.0+

    css3背景颜色渐变属性 兼容性测试基础环境为:windows系统:IE6.0+, Firefox4.0+, Chrome4.0+, Safari4.0+, Opera15.0+ 语法: <li ...

  2. 从零开始学习前端开发 — 17、CSS3背景与渐变

    一.css3背景切割: background-clip:border-box|padding-box|content-box; 作用: 用来设置背景的可见区域 a) border-box 默认值,背景 ...

  3. CSS3背景,渐变

    1,有利于代码维护,有利于使用debug进行调试打断点.2,后面三个都存在计算,所以分开写最好.背景复合属性最好的写法,background:#abcdef url() no-repeat 50px ...

  4. CSS3背景与渐变

    一.CSS3 背景图像区域 background-clip(指定背景绘制区域) ackground-clip: border-box / padding-box / content-box; /*没有 ...

  5. css3背景颜色渐变属性

    https://www.cnblogs.com/ningkyolei/p/4623697.html 很久之前写的一篇文章了,今天重新整理一下关于css3背景渐变的写法,至于是怎么来的,可以看下面渐变的 ...

  6. 让低版本IE支持css3背景图片缩放属性background-size

    IE7,8中不支持背景图片的缩放.下面的代码可以帮你实现兼容 background: url(/content/img/yuehuibtn.png);//css3代码 background-size: ...

  7. CSS3背景图片(多重背景、起始位置、裁剪、尺寸)

    一.多重背景图片 ①CSS3允许我们在一个元素上添加多个图片 ②多重背景可以把多个图片资源添加到background属性上,用逗号隔开,然后用background-position把他们定位到你想要的 ...

  8. css3背景颜色渐变

    <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content ...

  9. css3基础-选择器+边框与圆角+背景与渐变

    Css3选择器相关: section > div直接子元素选择器 div + article相邻兄弟选择器(在元素之后出现) div ~ article通用兄弟选择器(在元素之后出现) 属性选择 ...

随机推荐

  1. VMware ESXi定制版(OEM ISO)资源下载

    一.VMware ESXi 5.1.0 update03 链接: https://pan.baidu.com/s/1nvQ4CGD 密码: acc1 1.VMware-ESXi-5.1.0-Updat ...

  2. vue自己写了一个div菜单,点击按钮展开,点击其他地方关闭这个div菜单

    需求是通过点击body页面,在其他地方就关闭这个<div>菜单,给这个div一个id:problemList,但是点击我打开的按钮,不关闭. created () { document.o ...

  3. TensorFlow技术解析与实战学习笔记(13)------Mnist识别和卷积神经网络AlexNet

    一.AlexNet:共8层:5个卷积层(卷积+池化).3个全连接层,输出到softmax层,产生分类. 论文中lrn层推荐的参数:depth_radius = 4,bias = 1.0 , alpha ...

  4. RobotFrameWork+APPIUM实现对安卓APK的自动化测试----第五篇【AppiumLibrary校验函数介绍】

    http://blog.csdn.net/deadgrape/article/details/50619050 以上连作者先跪一下方便面,在上一篇中,作者遗漏了两个常用的函数: 1.长按 Long P ...

  5. 工具-NuGet

    1.添加下载后,会将文件添加到当前项目的引用和bin目录中 ORM是一种插件/组件,将对集合对象的操作映射为对关系型数据库的操作,这个映射是相互的 来自为知笔记(Wiz)

  6. rabbitMQ学习笔记(三) 消息确认与公平调度消费者

    从本节开始称Sender为生产者 , Recv为消费者   一.消息确认 为了确保消息一定被消费者处理,rabbitMQ提供了消息确认功能,就是在消费者处理完任务之后,就给服务器一个回馈,服务器就会将 ...

  7. redis代码解析-dictionary类型

    dict本质上是为了解决算法中的查找问题(Searching),一般查找问题的解法分为两个大类:一个是基于各种平衡树,一个是基于哈希表. redis中的dict传统的哈希算法类似,它采用某个哈希函数从 ...

  8. Cocos2d-x3.0 从代码中获取cocostudio编辑的UI控件

    依据名字查找控件 须要包括的头文件及名字空间: #include "cocostudio/CocoStudio.h" #include "ui/CocosGUI.h&qu ...

  9. MongoDB初探系列之四:MongoDB与Java共舞

    因为版本号不同,可能API也有所不同.本次学习用的是3.0版本号. 1.使用的mongodb的jdbc驱动版本号为:mongo-java-driver-3.0.0.jar 2.本节仅仅是简介JDBC操 ...

  10. .net mvc Model 验证总结

    ASP.NET MVC4中的Model是自验证的,这是通过.NET4的System.ComponentModel.DataAnnotations命名空间完毕的. 我们要做的仅仅是给Model类的各属性 ...