如何将colorzilla生成的CSS应用于body元素

时间:2013-12-11 04:50:27

标签: css css3

我是从colorzilla生成的,并希望将它应用到身体但我得到了线条。任何人都可以帮我解决这个问题吗?

http://jsfiddle.net/7Qr4m/

body {
    background: -moz-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%, rgba(226,226,226,1) 100%);
 /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(226,226,226,1)));
 /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(226,226,226,1) 100%);
 /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(226,226,226,1) 100%);
 /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover, rgba(255,255,255,1) 0%,rgba(226,226,226,1) 100%);
 /* IE10+ */
    background: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%,rgba(226,226,226,1) 100%);
 /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e2e2e2',GradientType=1 );
 /* IE6-9 fallback on horizontal gradient */;
}

1 个答案:

答案 0 :(得分:2)

在您的示例中,html / body的高度均为0

添加以下内容将解决此问题:

jsFiddle example

body, html {
    height: 100%;
}