Html ';位置:固定';不适用于三星S3

Html ';位置:固定';不适用于三星S3,html,css,popup,Html,Css,Popup,我在我的网站上使用了一个弹出窗口,我在加载图像时应用了.gif。我想把图像固定在屏幕中央。我正在使用以下CSS: background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8); bottom: 0; display: block; height: 100px; left: 0; margin: auto; padding: 20px; position: fixed; right: 0; top: 0; width: 100px; border-ra

我在我的网站上使用了一个弹出窗口,我在加载图像时应用了.gif。我想把图像固定在屏幕中央。我正在使用以下CSS:

background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
bottom: 0;
display: block;
height: 100px;
left: 0;
margin: auto;
padding: 20px;
position: fixed;
right: 0;
top: 0;
width: 100px;
border-radius:25px;
box-sizing:border-box;
除了三星S3,它在所有设备和桌面上都很好


我们是否有一个替代方案来代替
位置:修复了

当遇到此类问题时,您可以向 此外,还应在位置后声明指令,如top、bottom、left和right,并为0提供度量值

比如说

position: fixed;
right: 0px;
left: 0px;
top: 0px;
bottom: 0px;
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.8);
display: block;
height: 100px;
margin: auto;
padding: 20px;
width: 100px;
border-radius:25px;
box-sizing:border-box;

我找到了解决办法。我在那个Div之前添加了一个父Div。我在父Div上应用了以下样式,在子Div上应用了position absolute。它是固定的。谢谢大家的支持

position:fixed;
right: 0px;
left: 0px;
top: 0px;
bottom: 0px;
display: block;

你在哪里有固定的位置?我只看到绝对值。panther的评论是合理的,但你可以试试这个:try
margin:0auto代替
页边距:自动抱歉,它的位置:修正而不是绝对,我的错误:/@Gunaseelan margin 0 auto不工作