[英]How can I to specify the height where a color gradient starts using linear-gradient
How can I specify where color gradient starts in a div. 如何指定颜色渐变在div中的起始位置。
I have the below gradient: 我有以下渐变:
style="background: linear-gradient(to bottom, white,#B8DBFF)
I would like the div to be purely white from top to around 200px down then have the gradient starts at that point. 我希望div从上到下大约是200px,然后在那个点开始渐变。
background: linear-gradient(to bottom, #ffffff 0%,#ffffff 200px,#b8dbff 100%);
Example: http://jsfiddle.net/CEFkZ/ 示例: http : //jsfiddle.net/CEFkZ/
(I used this gradient generator ) (我用过这个梯度发生器 )
You can use degree to define the starting point. 您可以使用degree来定义起点。
Refer this to learn more about CSS3: 请参阅此以了解有关CSS3的更多信息:
http://www.css3files.com/gradient/ http://www.css3files.com/gradient/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.