Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 调整窗口大小时,渐变会消失_Html_Css - Fatal编程技术网

Html 调整窗口大小时,渐变会消失

Html 调整窗口大小时,渐变会消失,html,css,Html,Css,我有一个CSS渐变,运行页面的高度: html { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif; background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e5fcc2), color-stop(47%,#ecfdd2),

我有一个CSS渐变,运行页面的高度:

html {
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e5fcc2), color-stop(47%,#ecfdd2), color-stop(100%,#fafef3));
    background-image: -moz-linear-gradient(#e5fcc2, #fafef3);
    background-repeat: no-repeat;
    height: 100%;
}
然而,由于某些原因,当我调整窗口大小时,特别是当我将其缩小时,在页面底部有一个很大的白色区域,渐变会消失。当窗口很长时,我没有这个问题

知道怎么解决吗?

解决了这个问题

需要设置
min height:100%
,该选项适用于Chrome 21、FF 12和Safari 6。
我也有
背景重复:没有重复
html
块中。

您必须指定出现此问题的浏览器。版本也很重要。例如,chrome 10+使用另一个渐变命令,然后使用chrome哪个浏览器?我无法在chrome上重现这一点:使用chrome 21,但在Safari 6中一切正常。这也发生在FF 12中,我需要向代码中添加什么才能避免这种情况发生<代码>已修复