Android 渐变只出现在屏幕边缘,而不是html(手机上的html/css)

Android 渐变只出现在屏幕边缘,而不是html(手机上的html/css),android,html,css,Android,Html,Css,我已经玩了一整天了,我不能完全正确。有一个浅绿色到深绿色的渐变背景,我直接放在html的body{}代码上。这是一个被拉入应用程序的网页,但我也使用Chrome像其他网页一样访问该网页,结果是一样的 我还不能添加图像(低代表性和所有),因为这是我们个人服务器上的银行应用程序,我被要求不要链接任何人。这是我的代码(我相信这些代码是相关的) 它所做的似乎是首先填充渐变中最后一个div的底部,然后将渐变应用到背景上(当我展开窗口时,“底部”渐变会发生变化,就像被拉一样,但div后面的渐变不会发生变化)

我已经玩了一整天了,我不能完全正确。有一个浅绿色到深绿色的渐变背景,我直接放在html的body{}代码上。这是一个被拉入应用程序的网页,但我也使用Chrome像其他网页一样访问该网页,结果是一样的

我还不能添加图像(低代表性和所有),因为这是我们个人服务器上的银行应用程序,我被要求不要链接任何人。这是我的代码(我相信这些代码是相关的)

它所做的似乎是首先填充渐变中最后一个div的底部,然后将渐变应用到背景上(当我展开窗口时,“底部”渐变会发生变化,就像被拉一样,但div后面的渐变不会发生变化)。在我的手机(nexus 4 android)上,渐变会100%地填充原始屏幕视图,但低于此值的任何内容都会以与上面相同的方式显示其自身的渐变(也就是说,如果我滚动,屏幕底部会有一条清晰的线)

我试过设置html,身体高度:100%,最小高度:100%,或最大高度:100%,但没有一个能做到这一点。最小高度可能是最接近的,因为其他两个渲染的是普通背景色,而不是“第二”渐变

编辑:试图更好地解释。。。既然我不能做截图,那就做一个图表吧:P

--------------------
|  |   (A)       | |   <--- if this is the main page....
|  |            <---------- then (A) is the total area of my content
|  |             | |        to the bottom of my last div.
|  --------------- |        The gradient fills the main page to the bottom
|                  |        of (A) (which spans the full width, poorly represented).
|                  |        But then the entire thing seems to have it's own gradient
|                  |        as well that fills in behind (A) and flows to the bottom,
--------------------        and on a mobile device, the bottom line of (A) is not 
                            the bottom of the last div, but the bottom of the
                            device screen. So when you scroll, that bottom line
                            scrolls up with the rest of the content and there is a
                            second gradient background that fills the rest of the area 
                            like it's supposed to. But the gradient is only applied
                            to one area in the CSS, nowhere else.


....
....

我希望我能正确理解您的问题:

如果我这样做了,您的大部分代码都是正确的。您希望保留
边距:0
以及
最小高度
。基本上,您希望给您的背景一个固定的位置,以便即使在上面的文档滚动时也能“保持它在原位”

尝试将其添加到
填充:0

background-repeat: no-repeat;
background-attachment: fixed;
<html xmlns="http://www.w3.org/1999/xhtml" >
....
</head>
<body>
  <form id="frm" class="container" runat="server">

        <div class="topBar">
....
background-repeat: no-repeat;
background-attachment: fixed;