gpt4 book ai didi

css - 背景图片在 Chrome 中没有垂直拉伸(stretch)

转载 作者:太空宇宙 更新时间:2023-11-04 16:31:26 27 4
gpt4 key购买 nike

CSS -

#header {       
overflow: hidden;
background: url(images/header-bg.png) top repeat-x #FFFFFF;
position: relative;
border: none;
display: block;
height: 125px;
width:100%;
}

HTML -

<div id="header">
<a href="http://localhost/" title="Dev" id="logo"><img src="images/logo.png" alt="" /></a>
</div>

这在 Firefox 中运行良好 -

alt text

但不是在 Chrome :( -

alt text

图像未在 Chrome 中垂直拉伸(stretch)。

帮助!

请注意,我在 Linux 上。

编辑:背景图片 (50x112px) -

alt text

在这里查看 - http://movie-buffs.info/

最佳答案

因此 chrome 会自动占用另一个 css 文件的背景大小。

当我放

background-size: auto auto !important;

#header中,

问题解决了。

感谢大家的帮助。

关于css - 背景图片在 Chrome 中没有垂直拉伸(stretch),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4536821/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com