gpt4 book ai didi

html - Explorer 9 中的背景位置

转载 作者:行者123 更新时间:2023-11-28 14:20:02 24 4
gpt4 key购买 nike

我在定位 body 背景时遇到问题。它是这样的:

<script type="text/javascript">
<!--body id="body" style="
text-align:center;
background-color:#031a43;
background-image : url('design/bgFrontPage.jpg');
background-repeat:no-repeat;
background-position: top center;" //-->
</script>

在所有浏览器中都可以正常工作,除了 IE 9,其中 bg 向左移动。

有什么想法吗?

最佳答案

很奇怪。

我在我的页面中尝试这段代码:

<head>
<title></title>
<style type="text/css">
.bg
{
text-align: center;
background-color: #031a43;
background-image: url('Styles/166894621.jpg');
background-repeat: no-repeat;
background-position: top center;
}
</style>
</head>
<body class="bg">
</body>

背景图片位于中心。

关于html - Explorer 9 中的背景位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8601055/

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