2013-12-11 81 views
0

我已經從colorzilla生成了這個,並希望將其應用於body,但我得到了線條。誰能幫我解決這個問題嗎?如何將colorzilla生成的CSS應用到body元素

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 */; 
} 

回答

2

在你的榜樣,無論是html/body0的高度。

添加以下將解決這個問題:

jsFiddle example

body, html { 
    height: 100%; 
} 
相關問題