• 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. 有n人围成一圈,顺序排号。从第1个人开始报数(从1到3报数),凡报到3的人退出圈子,问最后留下的是原来的第几号的那位。

    #include <iostream> using namespace std; int main() { int i,j,n,m,k,*p,num[100];k=m=0;   cin&g ...

  2. 解决APP中fragment重叠问题

    由于内存重启,导致的frgament重叠,其原因就是FragmentState没有保存Fragment的显示状态,即mHidden,导致页面重启后,该值为默认的false,即show状态,所以导致了F ...

  3. PHP数据过滤

    1.php提交数据过滤的基本原则  1)提交变量进数据库时,我们必须使用addslashes()进行过滤,像我们的注入问题,一个addslashes()也就搞定了.其实在涉及到变量取值时,intval ...

  4. centos上安装rabbitmq并且python测试

    把我的阿里云重置了一下,重新安装rabbitmq,看看会出现什么问题. 首先,把erlang环境安装一下,直接 yum list | grep erlang erlang.x86_64 R16B-03 ...

  5. 安卓 eclipse项目创建

    一. 创建项目工程 1.  点击 file -> new -> Android Application project -> 2.  创建工程项目名字   自己命名 (注: 不要出现 ...

  6. 如何在Ubuntu安装*.exe文件

    下载及安装 若你使用 Debian 或者 Ubuntu 之类的发行版,只需要一个命令即可完成安装: apt-get install wine 若你使用的为其他发行版,请访问 http://winehq ...

  7. cf Strings of Power

    http://codeforces.com/contest/318/problem/B #include <cstdio> #include <cstring> #includ ...

  8. Android Spinner使用简介

    Android中使用Spinner作为下拉列表,下面直接看实现方式: (1)使用ArrayAdapter来实现: 实现步骤: 1. 在布局文件中定义Spinner组件: 2. 向Spinner添加需要 ...

  9. javascript 典型闭包的用法

    <body><input type="radio" id="radio1" name="readionGroup" /&g ...

  10. [置顶] js对象

    js中,一切事物都是对象.对象是一切的基础. 而具体到某一个对象时. 对象则是包含一组变量和函数的集合实例 我们先来中体会下je对象的全局. 接下来就具体揭开这个对象的面纱吧 ja对象分类 Funct ...