Question about a specific gradient with css3

北慕城南 提交于 2019-12-12 04:27:52

问题


I am not sure how to exactly phrase this question so maybe that's why I can't find help with this.

I am coding a webpage and the designer has made a background for a part of it. It's sort of a two way gradient: both horizontal and vertical at the same time. I am attaching the image here because I'm not sure how to explain it.

I'm sorry if it's very obvious but I can't find anything resembling this anywhere. Thank you! Here's the image:

EDIT: The question is, can I make this background using just CSS3? Thanks!


回答1:


Are you able to limit browser support to browsers that support multiple backgrounds?

If so, you can create two gradients, along with a border, to simulate that.

Here's a version that only works in Firefox: http://pastehtml.com/view/b295elnso.html

You can modify the webkit and other lines to get it working in other browsers. I used the Ultimate CSS Gradient Generator to build the lower gradient.

Here's a good listing of multiple background support.

(Edit: I meant only works in Firefox, not IE. Doh!) *(Edit2: Added multiple background support listing)*



来源:https://stackoverflow.com/questions/6887555/question-about-a-specific-gradient-with-css3

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