css3之gradient
- 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>- A
<position>, interpreted in the same way asbackground-positionortransform-origin. If omitted, the default iscenter.定位与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) orellipse(meaning that the shape is an axis-aligned ellipse). The default value isellipse.渐变形状,一是圆形(恒定半径),二是椭圆(轴对齐椭圆),默认的是椭圆。 <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-sideThe 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-cornerThe gradient's ending shape is sized so it exactly meets the closest corner of the box from its center.
渐变形状的大小根据起始点(center)与最近的角的距离决定
farthest-sideSimilar 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-cornerThe 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 of0%, or a length of0, represents the center of the gradient, the value100%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的更多相关文章
- 使用CSS3创建文字颜色渐变(CSS3 Text Gradient)
考虑一下,如何在网页中达到类似以下文字渐变的效果? 传统的实现中,是用一副透明渐变的图片覆盖在文字上.具体实现方式可参考 http://www.qianduan.net/css-gradient-te ...
- css3整理--gradient
gradient语法: -moz-linear-gradient( [<point> || <angle>,]? <stop>, <stop> [, & ...
- css3渐变gradient
参考: http://www.w3cplus.com/content/css3-gradient
- CSS3 Gradient 渐变
转载自:http://www.w3cplus.com/content/css3-gradient CSS3发布很久了,现在在国外的一些页面上常能看到他的身影,这让我羡慕已久,只可惜在国内为了兼容IE, ...
- CSS3 Gradient
CSS3CSS3发布很久了,现在在国外的一些页面上常能看到他的身影,这让我羡慕已久,只可惜在国内为了兼容IE,让这一项技术受到很大的限制,很多Web前端人员都望而止步.虽然如此但还是有很多朋友在钻研C ...
- css3 Gradient背景
css3的gradient分为两种:线性渐变(linear)和径向渐变(radial). 一.线性渐变linear-gradient 1.介绍 linear-gradient([设置方向],[设置开始 ...
- 实用的CSS3属性和使用技巧
CSS可以改进网站的设计并且开拓网站设计更多的可能性,可以令你的网页更具吸引力.对于前端开发者.网站设计师来说,掌握并熟练应用CSS是一项必不可少的技能. 下面列出了一些非常实用的CSS3属性和使用技 ...
- css3制作滚动按钮
1,中间圆点用到css3的gradient属性 2,运动用到css3的transition属性 3,需要写各个浏览器的兼容 代码如下 <!DOCTYPE html> <html la ...
- gradient杂谈
工作中难免遇到某些小项目中没有设计的情况,这对于PS基础薄弱的我来说非常恐怖.无奈之下,只好自己自学UI方面的知识,但对于某些能用CSS实现的背景样式等,还是尽可能地用已经掌握的知识去实现.本文主要分 ...
随机推荐
- 转载:css3 box-shadow投影发光效果
转载网址:http://www.wufangbo.com/css3-box-shadow/ CSS3的box-shadow属性 可以让我们轻松实现图层阴影效果.我们来实战详解一下这个属性. 1. bo ...
- python编程中在ubuntu中安装虚拟环境及环境配置
1.升级python包管理工具pip pip install --upgrade pip 备注:当你想升级一个包的时候 `pip install --upgrade 包名` 2.python虚拟环境安 ...
- BIOS讲解
首先 BIOS其实没什么神奇的 就是 Bisic input/output System,所以基本输入输出系统是一块装入了启动和自检程序的EPROM或EEPROM集成块,实际上它是被固化在计算机R ...
- pure.css 学习记录
兼容性记录: IE 8+ Latest Stable: Firefox, Chrome, Safari iOS 6-8 Android 4.x 处理兼容性 <!--[if lte IE 8]&g ...
- S3C2440 驱动程序开发
转载:http://www.cnblogs.com/lishixian/articles/2999923.html
- cf B. Hungry Sequence
http://codeforces.com/contest/327/problem/B 这道题素数打表就行. #include <cstdio> #include <cstring& ...
- Chaos Software Google Sync v10.1.1.0 和Syncovery Pro
Chaos Software Google Sync v10.1.1.0 Release: Chaos.Software.Google.Sync.v10.1.1.0.Incl.Keygen-BEANS ...
- How to install phpmyadmin on centos 6
Phpmyadmin : Phpmyadmin is a free tool used to administrate MySQL . Phpmyadmin supports all major ...
- SQL Server 通过一个表和另一个表联合 批量更新这个表的字段
UPDATE OutPzPersonSet SET cPerson = a.AAA --SELECT * FROM OutPzPersonSet d INNER JOIN AAAA a ON d.cz ...
- AS3给显示对象加边框
给显示对象加边框,可以有以下三种方法1.根据相交路径的缠绕规则的奇偶规则法(使用奇偶缠绕规则时,任何相交路径都交替使用开放填充与闭合填充.如果使用同一填充绘制的两个正方形相交,则不会填充相交的区域.通 ...