• radial-gradient

  The CSS radial-gradient() function creates an <image> which represents a gradient of colors radiating from an origin, thecenter of the gradient. The result of this function is an object of the CSS <gradient> data type.  

  radial-gradient()创建一个从园点开始颜色渐变的图片,这方法的结果是一个<gradient>的对象。

Radial gradients are defined by their center, the ending shape contour and position, and color stops.径向渐变由 [ 中心点、结束轮廓线、位置、颜色停止位 ]定义。The radial gradient consists, going from its center to its ending shape and potentially beyond, of successive uniformly-scaled concentric shapes, identical to the ending shape. 径向渐变的组成是,从中心点到结束轮廓线再到边界,是连续的均匀缩放的同心形状,与结束轮廓线的形状一样。Color stops are positioned on a virtual gradient ray going out horizontally of the center and going to the right. 颜色停止位是在一条水平的,从中心点往右的,虚拟渐变线上。Percentages positioning of color stops are relative to the intersection between the ending shape and this gradient ray representing 100%.百分比的定位是基于结束轮廓线与渐变放射线的交点,在0%到100…%之间。 Each shape is monocolor and defined by the color on the gradient ray it intersects.每一个形状都是纯色的,并且颜色由其相交的渐变放射线来定义。Ending shapes can only be circle or ellipse.结束轮廓线只能是圆形或者椭圆形。 ( 感觉“结束轮廓线”比“形状”好点 )

  Like any other gradient, a CSS radial gradient is not a CSS<color>but an image with no intrinsic dimensions,就像其他渐变一样,径向渐变不是color而是一张没有固定维度(width*height)的图片 i. e. it has no natural or preferred size, nor ratio.换言之,它没有默认的/首选的大小/比例。 Its concrete size will match the one of the element it applies to.它具体的大小是由其所在元素决定

  The radial-gradient function does not allow repeating gradients. For such a functionality, use the CSS repeating-radial-gradient function.径向渐变方法不允许重复渐变。要实现这个功能,使用repeat-radial-gradient方法

  • Values

<position>
<position>, interpreted in the same way as background-position or transform-origin. If omitted, the default is center.定位与background-position或者transform-origin的写法一样。如果省略,默认是center。
<shape>
The gradient's shape. This is one of circle (meaning that the gradient's shape is a circle with constant radius) or ellipse(meaning that the shape is an axis-aligned ellipse). The default value is ellipse.渐变形状,一是圆形(恒定半径),二是椭圆(轴对齐椭圆),默认的是椭圆。
<size>
The size of the gradient. This is one of the Size constants listed below. 渐变大小 at 20px 20px
Keywords describing how big the ending shape must be. The possible keywords are: 描述结束轮廓线大小的可用关键字:(-webkit前缀不支持,请使用radial-gradient。)
Constant Description
closest-side

The gradient's ending shape meets the side of the box closest to its center (for circles) or meets both the vertical and horizontal sides closest to the center (for ellipses).

渐变形状的大小根据起始点(center)与最近的边的距离决定

closest-corner

The gradient's ending shape is sized so it exactly meets the closest corner of the box from its center.

渐变形状的大小根据起始点(center)与最近的角的距离决定

farthest-side

Similar to closest-side, except the ending shape is sized to meet the side of the box farthest from its center (or vertical and horizontal sides).

渐变形状的大小根据起始点(center)与最远的边的距离决定

farthest-corner

The gradient's ending shape is sized so it exactly meets the farthest corner of the box from its center.

渐变形状的大小根据起始点(center)与最远的角的距离决定

<color-stop>
Representing a fixed color at a precise position, this value is composed by a <color> value, followed by an optional stop position (either a <percentage> or a <length> along the virtual gradient ray). 代表在确定的位置有确定的颜色,由一个颜色值,和紧跟一个可选的定位。A percentage of 0%, or a length of 0, represents the center of the gradient, the value 100% the intersection of the ending shape with the virtual gradient ray. Percentage values in-between. are linearily positioned on the gradient ray.0或者0%表示渐变的起始点,100%表示结束轮廓线与虚拟渐变放射线的交点位置。百分比取值区间是渐变反射线上线性递增。
ps: 重复渐变
background:repeating-linear-gradient(black 10px,white 20px);
background:repeating-radial-gradient(circle closest-side,#000 0%,#fff 10%);

css3之gradient的更多相关文章

  1. 使用CSS3创建文字颜色渐变(CSS3 Text Gradient)

    考虑一下,如何在网页中达到类似以下文字渐变的效果? 传统的实现中,是用一副透明渐变的图片覆盖在文字上.具体实现方式可参考 http://www.qianduan.net/css-gradient-te ...

  2. css3整理--gradient

    gradient语法: -moz-linear-gradient( [<point> || <angle>,]? <stop>, <stop> [, & ...

  3. css3渐变gradient

    参考: http://www.w3cplus.com/content/css3-gradient

  4. CSS3 Gradient 渐变

    转载自:http://www.w3cplus.com/content/css3-gradient CSS3发布很久了,现在在国外的一些页面上常能看到他的身影,这让我羡慕已久,只可惜在国内为了兼容IE, ...

  5. CSS3 Gradient

    CSS3CSS3发布很久了,现在在国外的一些页面上常能看到他的身影,这让我羡慕已久,只可惜在国内为了兼容IE,让这一项技术受到很大的限制,很多Web前端人员都望而止步.虽然如此但还是有很多朋友在钻研C ...

  6. css3 Gradient背景

    css3的gradient分为两种:线性渐变(linear)和径向渐变(radial). 一.线性渐变linear-gradient 1.介绍 linear-gradient([设置方向],[设置开始 ...

  7. 实用的CSS3属性和使用技巧

    CSS可以改进网站的设计并且开拓网站设计更多的可能性,可以令你的网页更具吸引力.对于前端开发者.网站设计师来说,掌握并熟练应用CSS是一项必不可少的技能. 下面列出了一些非常实用的CSS3属性和使用技 ...

  8. css3制作滚动按钮

    1,中间圆点用到css3的gradient属性 2,运动用到css3的transition属性 3,需要写各个浏览器的兼容 代码如下 <!DOCTYPE html> <html la ...

  9. gradient杂谈

    工作中难免遇到某些小项目中没有设计的情况,这对于PS基础薄弱的我来说非常恐怖.无奈之下,只好自己自学UI方面的知识,但对于某些能用CSS实现的背景样式等,还是尽可能地用已经掌握的知识去实现.本文主要分 ...

随机推荐

  1. (转载)MVC 4.0 PartialView()与View()真的一样吗?

    转载自:http://www.cnblogs.com/lori/ 当我们使用razor作为页面引擎时,它的视图文件扩展名为cshtml或者vbshtml,而之前作为分部视图的ascx文件,进行razo ...

  2. MVC4 路由参数带点 文件名后缀导致错误

    错误描述 最近在研究office在线预览,用到mvc4  apicontroller 需要传参是文件名,如test.docx导致错误"指定的目录或文件在 Web 服务器上不存在", ...

  3. Codeforces 429B Working out

    http://codeforces.com/contest/429/problem/B 题意:一个从左下到右上,一个从左上到右下,要求只相交一次,求整个路径和的最大值 思路:发现可以枚举交点,然后算到 ...

  4. Qt信号和槽的个人总结

    1.connect connect(sender,SIGNAL(signal()),receiver,SLOT(slot())); 这里用到了两个宏:SIGNAL() 和SLOT():通过connec ...

  5. NOI2011 兔兔与蛋蛋游戏

    http://www.lydsy.com/JudgeOnline/problem.php?id=2437 这道题真是极好的. 75分做法: 搜索. 出题人真的挺良心的,前15个数据点的范围都很小,可以 ...

  6. bzoj2346[Baltic 2011]Lamp

    Description 2255是一个傻X,他连自己家灯不亮了都不知道. 某天TZ大神路过他家,发现了这一情况, 于是TZ开始行侠仗义了. TZ发现是电路板的问题, 他打开了电路板,发现线路根本没有连 ...

  7. 支持多文件上传,预览,拖拽,基于bootstra的上传插件fileinput 的ajax异步上传

    首先需要导入一些js和css文件 <link href="__PUBLIC__/CSS/bootstrap.css" rel="stylesheet"&g ...

  8. 浅谈c语言中的堆

    操作系统堆管理器管理: 堆管理器是操作系统的一个模块,堆管理内存分配灵活,按需分配. 大块内存: 堆内存管理者总量很大的操作系统内存块,各进程可以按需申请使用,使用完释放. 程序手动申请&释放 ...

  9. NUnit - 使用感受

    Nunit使用 最近项目开始大量使用Nunit, 发现Nunit还是有很多好处的. 1. 测试驱动逻辑,这样可以尽最大可能减少“修改”引入的Bug. 如果你修改了一些东西,导致Case跑不过.请检查你 ...

  10. Android之Intent

    前言:大家都知道Android程序的实现一般都由四大组件构成: Activity :Android程序实现功能的主体,提供了和客户交互的界面,也提供了和后台交互的功能. Service :是一个没有界 ...