如何在css3中为body设置渐变? [英] How set gradient top-right for body in css3?

查看:1041
本文介绍了如何在css3中为body设置渐变?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例代码:



这是代码设置渐变top.how将gradeint更改为左上角?


body

{

filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = white 100%,endColorstr = black 0%, GradientType = 1);!important



-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = white 100%,endColorstr = black 0%,GradientType = 1);!重要

...

}

example code :

this is code set gradient top.how change gradeint to top-left?

body
{
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=white 100%, endColorstr=black 0%, GradientType=1 );!important

-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=white 100%, endColorstr=black 0%, GradientType=1);!important
...
}

推荐答案

示例



Example

A linear gradient from top to bottom:
#grad
{
background: -webkit-linear-gradient(red, blue); /* For Safari */
background: -o-linear-gradient(red, blue); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(red, blue); /* For Firefox 3.6 to 15 */
background: linear-gradient(red, blue); /* Standard syntax */
}


这篇关于如何在css3中为body设置渐变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆