猿问
这种布局能否用纯css实现
如图,左边的头像部分是固定的,但是右边的宽度是随着父元素的宽度而变化的,虽然可以通过js计算后来控制它的宽,我想问可不可以用纯css来实现?
守着一只汪
浏览 578
回答 1
1回答
慕慕森
<div class="a1" style="position: relative;"> <div class="a2" style=" width: 100px; height: 100px; position: absolute; left: 0; top: 0; background: red;"></div> <div class="a3" style=" margin-left: 120px; background: blue; height: 100px;"></div> </div>
0
0
0
随时随地看视频
慕课网APP
相关分类
JavaScript
我要回答