Html 绝对位置div到相对父对象的底部

Html 绝对位置div到相对父对象的底部,html,css,Html,Css,我试图将“蓝色”放在父容器“绿色”的底部。我试过跟踪,但没能成功。我希望蓝色的在绿色的底端 绿色{ 位置:相对位置; 宽度:自动; 高度:200px; 背景颜色:绿色; } #蓝色的{ 职位:绝对职位; 底部:0; 高度:75px; 宽度:自动; 背景颜色:蓝色; } 1-您需要将位置绝对值更改为绝对值为#蓝色,然后在宽度自动后更改为宽度100% #blue { position: absolute; bottom: 0; height: 75px; wid

我试图将“蓝色”放在父容器“绿色”的底部。我试过跟踪,但没能成功。我希望蓝色的在绿色的底端

绿色{ 位置:相对位置; 宽度:自动; 高度:200px; 背景颜色:绿色; } #蓝色的{ 职位:绝对职位; 底部:0; 高度:75px; 宽度:自动; 背景颜色:蓝色; }
1-您需要将位置绝对值更改为绝对值为#蓝色,然后在宽度自动后更改为宽度100%

#blue {
    position: absolute;
    bottom: 0;
    height: 75px;
    width: 100%;
    background-color: blue;
}

下面是一个工作示例,您需要将位置absolute更改为绝对的#蓝色,然后在宽度自动后更改为宽度100%

#blue {
    position: absolute;
    bottom: 0;
    height: 75px;
    width: 100%;
    background-color: blue;
}

下面是一个工作示例,您需要将位置absolute更改为绝对的#蓝色,然后在宽度自动后更改为宽度100%

#blue {
    position: absolute;
    bottom: 0;
    height: 75px;
    width: 100%;
    background-color: blue;
}

下面是一个工作示例,您需要将位置absolute更改为绝对的#蓝色,然后在宽度自动后更改为宽度100%

#blue {
    position: absolute;
    bottom: 0;
    height: 75px;
    width: 100%;
    background-color: blue;
}

下面是一个工作示例,您可以将
absolute
更改为
absolute
。谢谢!我修正了打字错误,将宽度设置为100%,效果很好。将
absolout
更改为
absolute
。谢谢!我修正了打字错误,将宽度设置为100%,效果很好。将
absolout
更改为
absolute
。谢谢!我修正了打字错误,将宽度设置为100%,效果很好。将
absolout
更改为
absolute
。谢谢!我修正了打字错误,将宽度设置为100%,效果很好。