如何在背景中放置多色?

时间:2014-09-16 07:38:50

标签: css

enter image description here

请告诉我如何在背景屏幕上设置多色,如我附加的图像所示......

2 个答案:

答案 0 :(得分:1)

这是背景渐变。

您可以使用colorzilla工具生成CSS背景渐变:

http://www.colorzilla.com/gradient-editor/

-- See Demo --

background: #72c4e8; /* Old browsers */
background: -moz-linear-gradient(left,  #72c4e8 0%, #2260dd 50%, #72c4e8 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#72c4e8), color-stop(50%,#2260dd), color-stop(100%,#72c4e8)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left,  #72c4e8 0%,#2260dd 50%,#72c4e8 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left,  #72c4e8 0%,#2260dd 50%,#72c4e8 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left,  #72c4e8 0%,#2260dd 50%,#72c4e8 100%); /* IE10+ */
background: linear-gradient(to right,  #72c4e8 0%,#2260dd 50%,#72c4e8 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#72c4e8', endColorstr='#72c4e8',GradientType=1 ); /* IE6-9 */

答案 1 :(得分:0)

是Css渐变

这里给出了一个很好的解释 http://www.w3schools.com/css/css3_gradients.asp

线性渐变示例

#grad {
  background: -webkit-linear-gradient(left, red , blue); /* For Safari 5.1 to 6.0 */
  background: -o-linear-gradient(right, red, blue); /* For Opera 11.1 to 12.0 */
  background: -moz-linear-gradient(right, red, blue); /* For Firefox 3.6 to 15 */
  background: linear-gradient(to right, red , blue); /* Standard syntax */
}