Css 立场问题:绝对;

Css 立场问题:绝对;,css,position,css-position,Css,Position,Css Position,这就是正在发生的事情,正如你从浏览器屏幕下方的图像中看到的,屏幕的大小让女人盖住东西,或者像我所说的那样移动 这是我的密码 img#woman{ position:absolute; bottom:100px; display:block; right:55%; z-index: 900; } #homearea{ display:block; height:750px; } 我需要一个女人呆在一个地方她应该是这个样子 这是在看不到您的

这就是正在发生的事情,正如你从浏览器屏幕下方的图像中看到的,屏幕的大小让女人盖住东西,或者像我所说的那样移动

这是我的密码

img#woman{
    position:absolute;
    bottom:100px;
    display:block;
    right:55%;
    z-index: 900;
}
#homearea{
    display:block;
    height:750px;
}

我需要一个女人呆在一个地方她应该是这个样子


这是在看不到您的HTML的情况下:

尝试将包含div(#homearea?)上的位置设置为相对,然后将图像的方向值更改为相对于包含div的左上角

换言之,请尝试以下方法:

img#woman{
    position:absolute;
    top:200px;
    display:block;
    left:-30px;
    z-index: 900;
}
#homearea{
    position:relative;
    display:block;
    height:750px;
}

嗨,我想你可能是你在背景中使用了这样的图像

定义您的Homearea id position relative和Women id give position absolute和give to background Image,并根据您的布局设置为左-右-上-下

像这样

Css

#homearea{
 position:relative;

}

#woman{
width:xxx; // width of your images
height:xx; // height of your images
    position:absolute;
    bottom:100px;
    right:55%;
    z-index: 900;
background:url('../../xxx.jpg') no-repeat 0 0;
}
HTML

 <div id="homearea">
    <div id="woman"></div>
    </div>

我认为你应该定义职位:相对到您的父Div位置:绝对给您的儿童Div希望这能奏效

 img#woman{
    position:absolute;
    bottom:100px;
    display:block;
    right:55%;
    z-index: 900;
}
#homearea{
    height:750px;
    position:relative; 
}

显示您的标记以更好地理解和获得更好的结果…任何答案都有问题吗?