Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS-Safari中的问题_Css_Image_Html_Safari_Floating - Fatal编程技术网

CSS-Safari中的问题

CSS-Safari中的问题,css,image,html,safari,floating,Css,Image,Html,Safari,Floating,在较小的浏览器窗口中,css在Safari中移动,在Safari以外的其他浏览器中看起来很好 看一看?在Firefox中使用Chrome-然后在Safari中进行比较 无论使用何种浏览器或窗口大小,我只需要将图像或图像保持在同一位置 这是我目前使用的代码 <div style="z-index:10; position:absolute; margin-top:400px; margin-left:335px"> <img src="http://173.83.

在较小的浏览器窗口中,css在Safari中移动,在Safari以外的其他浏览器中看起来很好

看一看?在Firefox中使用Chrome-然后在Safari中进行比较

无论使用何种浏览器或窗口大小,我只需要将图像或图像保持在同一位置

这是我目前使用的代码

    <div style="z-index:10; position:absolute; margin-top:400px; margin-left:335px">
    <img src="http://173.83.251.7/~iworeitb/wp-content/uploads/2013/06/or.png" alt="" />
    </div>

刚刚尝试了第二种选择

我把代码改成如下仍然没有好位置的运气还有其他建议吗

    <div id = 'O' style="z-index:10; position:absolute; margin-top:20%; margin-left:18%">
    <img name="" src="http://shopiworeitbe.../2013/08/or.png" alt="" /></div>


    #O{
    height: 100%;
    max-height: 100%;
    overflow: auto;
    width: 100%;

#O{
身高:100%;
最大高度:100%;
溢出:自动;
宽度:100%;

还是不准确


请帮助,谢谢

使用像素或ems比使用百分比更幸运。
百分比是动态的,取决于视口,而像素和ems是静态值,将提供所需的结果。

如果绝对值失败,可以使用位置:静态