简体   繁体   English

如何使我的网站背景具有渐变色?

[英]how do i make my website background a gradient colour?

I am currently trying to create a website. 我目前正在尝试创建一个网站。

I have created the logo for the website but I'm not sure how to make my header and footer background a gradient color on Dreamweaver CS6. 我已经为网站创建了徽标,但是我不确定如何在Dreamweaver CS6上使页眉和页脚背景成为渐变颜色。

I can only put it as a solid color and I am not sure if I need to use CSS or HTML to change it. 我只能将其设置为纯色,并且不确定是否需要使用CSS或HTML进行更改。

Does anyone know if it is possible, and if it is how to do it? 有谁知道这是否可行,以及如何做到这一点?

thanks :) 谢谢 :)

There is a online tool from which you can generate css gradient - 有一个在线工具可用于生成CSS渐变-

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

On left side of screen you have options to choose colors and on right you have code which you need to copy in your css. 在屏幕的左侧,您可以选择颜色,在右侧的代码中,您需要将其复制到CSS中。

Try www.css3generator.com and then select gradient and select color and equivalent code will be generated ..copy the code and use in your CSS. 尝试www.css3generator.com,然后选择渐变并选择颜色,将生成等效代码..复制该代码并在CSS中使用。 This site is very helpful. 这个网站非常有帮助。

Use CSS3: 使用CSS3:

  body {
    background-image: -webkit-linear-gradient(top left, white 0%, #9FBFD2 100%);
    background-image: -moz-linear-gradient(top left, white 0%, #9FBFD2 100%);
    background-image: -o-linear-gradient(top left, white 0%, #9FBFD2 100%);
    background-image: linear-gradient(top left, white 0%, #9FBFD2 100%);
  }

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

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