Html IE 9背景图像位置属性

Html IE 9背景图像位置属性,html,css,internet-explorer,internet-explorer-9,Html,Css,Internet Explorer,Internet Explorer 9,我是CSS新手,尝试通过以下代码显示图像,它在Chrome和FireFox中工作,但在IE9中不工作。当我删除位置属性时,它会在IE9中显示图像。感谢您的帮助 <div style="background:url(/templates/intranet/images/car.png); background-position:50%; background-size:auto 70%; background-repeat:no-repeat;width:100%; height:100%;

我是CSS新手,尝试通过以下代码显示图像,它在Chrome和FireFox中工作,但在IE9中不工作。当我删除位置属性时,它会在IE9中显示图像。感谢您的帮助

<div style="background:url(/templates/intranet/images/car.png); background-position:50%; background-size:auto 70%; background-repeat:no-repeat;width:100%; height:100%;position:absolute;"></div>

试试这个:

<div style="background:url(/templates/intranet/images/car.png); background-position:50% 50%; background-size:auto 70%; background-repeat:no-repeat;width:100%; height:100%;position:absolute;"></div>


您必须添加“背景位置:50%50%;”才能编写正确的css。

我添加了top:0;左:0;但是没用你能把你的代码修改一下吗?