Simulating color stops in gradients for IE

落花浮王杯 提交于 2019-12-01 03:29:38

Multiple divs with coordinated gradient colors is the best way (short of using images) to create 3+ color gradients. See fiddle below for a working test:

http://jsfiddle.net/Hauhx/

I'd recommend you to use a background image as a fallback for browsers (as Opera and IE) that don't support CSS gradients.

user984003

Or use CSS3 PIE. Way easy.

From Setting linear gradient's starting and ending position in MSIE 9 and older

div {
    background-image: -moz-linear-gradient(360deg,rgb(255,255,255) 25% ,rgb(241,123,25) 75%);

    -pie-background: linear-gradient(360deg,rgb(255,255,255) 25% ,rgb(241,123,25) 75%);
behavior: url(/PIE.htc);
}

Update: if the div has a top margin then it seems to do away with it. At least in my case. Don't know if it's a combination of two things.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!