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实现的背景样式等,还是尽可能地用已经掌握的知识去实现.本文主要分 ...
随机推荐
- web标准(复习)--2 列布局
今天我们开始学习一列布局,包含以下几种形式: 1.一列固定宽度 2.一列固定宽度居中 3.一列自适应宽度 4.一列自适应宽度居中 5.一列二至多块布局 前一节我们回顾了xhtml基础和css基础部分, ...
- 利用css3-animation来制作逐帧动画
前言 趁着还没有元旦之前先码一篇文章,不然到时候估计又被各种虐了,所以趁现在还有力气先来一篇.今天来聊聊css3中的动画属性animation,对这个属性懵懂是在很早的时候有前辈用这个 animati ...
- Android用gif做启动页
公司的一个app的启动页想改为gif图,之前没有在android中加入过gif,所以赶紧饿补! 前言 我们都知道ImageView是不能完美加载Gif格式的图片,如果我们在ImageView中src指 ...
- HSV颜色识别demo
HSV(Hue, Saturation, Value)色彩空间是一种区别与RGB的表示形式.其模型可视为一个倒立的棱锥或圆锥. 其中H为色调,用角度度量,取值范围为0°-360°,从红色开始按逆时针方 ...
- Pausing Coyote HTTP/1.1 on http-8080
一般情况下我看到8080便认为是端口占用的问题,其实不是,但是在任务管理器中并没有找到javaw.exe,只有javaservice.exe, 只有重启tomcat了,蓝后就好了......
- Effective Java Item4:Enforce noninstantiability with a private constructor
Item4:Enforce noninstantiability with a private constructor 通过构造私有化,禁止对象被实例化. public class UtilClass ...
- Ubuntu12.04 下svn服务搭建及Windows客户端tortoisesvn的使用
在Ubuntu服务端搭建apache+svn 在客户端使用Tortoisesvn工具. 第一步 安装SVN $sudo apt-get install subversion 安装成功后系统会自动建立一 ...
- JAVA在线基础教程!
http://www.runoob.com/java/java-tutorial.html http://www.51zxw.net/list.aspx?cid=380 http://www.weix ...
- Python partial函数
以前都是摘录的其他网友的博客,很少是自己写的,学习阶段,多多学习.今天开始自己写了,首先写一下刚刚遇到的partial函数. 1.partial函数主要是对参数的改变,假如一个函数有两个参数,而其中一 ...
- Object-c学习之路十二(OC的copy)
oc中的拷贝分为:copy(浅拷贝)和mutablecopy(深拷贝). 浅拷贝也为指针拷贝,拷贝后原来的对象计数器会+1: 深拷贝为对象拷贝,原来的对象计数器不变. 注意:自定义对象拷贝时要实现NS ...