猿问

块级元素底部对其怎么弄

怎么像这样块级元素在块里面底部对齐


qq_0789
浏览 1860回答 3
3回答

不再热情似火

推荐你看下flex布局<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title><style>.father{        height: 300px;        width:300px;        border:1px solid #333;        display:flex;        align-items: flex-end;        justify-content:space-around;}.son{        height: 100px;        width:70px;        border:1px solid #ccc;}</style></head><body><div><div></div><div></div><div></div></div></body></html>

Yvonne_D

父元素position:relative; 子元素position:absolute; bottom:0;

Z374266866

我是定位的。。
随时随地看视频慕课网APP
我要回答