English 中文(简体)
在谷歌 Chrome,我如何从体质的高度增长,这取决于什么内容。
原标题:In Google Chrome, how do I get the body content s height to grow depending on the content just like it behaves in Firefox?

我的守则如下:

body{
    color:#666;
    margin:0px;
    background: -webkit-gradient( linear, left bottom, left top,  color-stop(0.25, #DCDCDC), color-stop(0.75, #FFFFFF));
    background: -moz-linear-gradient( center bottom, #DCDCDC 25%,#FFFFFF 75%);
    font:13px Arial, Helvetica, sans-serif;
}

I m试图做的是从上(白色)到底(灰色)的梯度,但底层梯度的终点应在内容的末尾停止。 例如,如果页面内容小于窗户,梯度就应当停留在该内容的底部,而不是该页底部。 这个例子在Pith 3+,但在google chrome,尸体的高度将自动覆盖窗口的100%。

任何想法? 我不想改变结构,因为Im使用超文本5的内容。

这里有超文本样本:(由于公司的限制,我删除了内容)

<html>
    <head>
        ... header here ...
    </head>
    <body>
        <header>
            ...header content here...
        </header>
        <article>
            ...body content here...
        </article>
        <footer>
            ...footer content here...
        </footer>
    </body>
</html>
问题回答

Did you include the <!DOCTYPE html> declaration at the beginning of your document?

我可以转录网站:

http://jsfiddle.net/2AwbB/

但我已经看到,背景正在重复,或许需要:

background: -webkit-gradient( linear, left bottom, left top,  color-stop(0.25, #DCDCDC), color-stop(0.75, #FFFFFF));

你们的法典像我国一样。 我看到的只是谷歌 Chrome。 我登上了Webkit或Sissa。 Oh和BTW I m使用谷歌9.0.597.47β。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签