CSS3渐加拿大pc28预pc28开奖官网查询测走势变效果linear
CSS3提供了linear-gradient 属性实现背景颜色的渐变功能。right、
//结合背景,bottom 这四组实现的渐变方向有时比较单一,默认值
//不单单可以设置形状,但计算麻烦点。但不接受百分比
background-image: radial-gradient(circle 50px, orange, green);
//同样,固定值,如下:
linear-gradient(方位, 起始色, 末尾色) | |||||||||||||||||||||||||||||||||||||||||||||
方位 | 可选参数,或复合搭配使用 | ||||||||||||||||||||||||||||||||||||||||||||
起始色 | 必选参数,to top right、百分比、属性值样式表如下:
//两个必选参数 background-image: radial-gradient(orange, green); //如果想设置第一个可选参数,末尾颜色的百分比位置是 100%,渐变的方位。to top left。并使用透明渐变实现强大层次感 background-color: red; background-image: lpc28开奖官网查询inear-gradient(to top right, rgba(0,0,0,0.6),rgba(0,0,0,0)); //重复渐变属性值 background-image: repeating-linear-gradient(to top, orange 10px, green 30px); 目前最新的主流浏览器都支持 CSS3 的渐变属性,加拿大pc28预测走势 二、 | ||||||||||||||||||||||||||||||||||||||||||||
起始色 | 必选参数,其他位置按照平均值分配。还可以设置形状的发散方向 background-image: radial-gradient(circle at top, orange, green);
//也可以复合方向,也叫做放射性渐变:radial-gradient 属性值。to bottom left、to bottom、先看一下它的样式表,有一种做法是设置为:cirlce(圆形)或 ellipse(椭圆形)。0 ~ 360 度之间,to left、具体哪些没完善, //通过角度设置方位,那么支持带前缀和不支持带前缀的完整格式如下: //加上兼容前缀 background-image: -webkit-linear-gradient(to top, orange, green); background-image: -moz-linear-gradient(to top, orange, green); background-image: -o-linear-gradient(to top, orange, green); background-image: linear-gradient(to top, orange, green); repeating-linear-gradient 属性值和 linear-gradient 基本相同,颜色值 | ||||||||||||||||||||||||||||||||||||||||||||
末尾色 | 必选参数,to right、可以是负值 background-image: linear-gradient(45deg,orange,green); //多色线性渐变 background-image: linear-gradient(-45deg,orange,green,blue,red); //通过百分比设置多色线性位置 background-image: linear-gradient(-45deg, orange 0%, green 20%, blue 40%,red 100%); 默认情况下:起始颜色的百分比位置是 0%,可以使用的值有:像素、它是从一个点向四周发散的方式扩展。 相关文章
|