CSS:linear |
您所在的位置:网站首页 › 蓝白渐变背景色怎么设置 › CSS:linear |
css语法
background: linear-gradient(direction,color-stop1,color-stop2,...);
direction:用角度值指定渐变的方向(或角度); color-stop1,color-stop2,...:用于指定渐变的起止颜色 ps:至少需要两种颜色 background: -webkit-linear-gradient(red,yellow,blue); background: -o-linear-gradient(red,yellow,blue); background: -moz-linear-gradient(red,yellow,blue); background: linear-gradient(red,yellow,blue); 兼容性to left 设置渐变从右到左,相当于270deg to right设置渐变从左到右,相当于90deg to top 设置渐变从下到上,相当于0deg to right top = to top right :从左下角到右上角,对角线角度 和to top right 有细微差别(背景为正方形的时候无差别) 用百分比指定起始颜色的位置,默认值为0%;
rgba使用了0.5的透明度 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |