简体   繁体   English

线性渐变结束得早

[英]Linear gradient ends to early

I have this linear gradient, and I can't figure out why it doesn't "work". 我有这个线性渐变,我不知道为什么它不能“起作用”。

It is supposed to start in light gray and end in with, but about 80% in, it goes all white, with a notable white line. 它应该以浅灰色开始,并以结尾,但大约80%的颜色变为全白,并带有明显的白线。 Can anyone see what is wrong? 谁能看到错在哪里?

My CSS is here: 我的CSS在这里:

background: white -webkit-linear-gradient(left, #efefef 0%,#f7f7f7 58%,#ffffff 100%);
background: white linear-gradient(left, #efefef 0%,#f7f7f7 58%,#ffffff 100%);

Thanks 谢谢

Edit: I'm using chrome to test the gradient... 编辑:我正在使用chrome测试渐变...

You set the default color white, use transparent... 您将默认颜色设置为白色,使用透明...

background: transparent -webkit-linear-gradient(left, #efefef 0%,#f7f7f7 58%,#ffffff 100%);
background: transparent linear-gradient(left, #efefef 0%,#f7f7f7 58%,#ffffff 100%);

@JPuge Take a look here to make easy the CSS Gradients http://www.colorzilla.com/gradient-editor/ @JPuge在此处查看以简化CSS渐变http://www.colorzilla.com/gradient-editor/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM