为了账号安全,请及时绑定邮箱和手机立即绑定

calc()函数在圣杯布局中用法

如果不考虑兼容的情况下,发现使用calc()也可以实现同样的效果,和大家分享一下:


正在回答

1 回答

<!--还是左中右的顺序-->
<div class="parent">
  <div class="left"></div>
  <div class="center"></div>
  <div class="right"></div>
</div>
.left, .center, .right {     
    height: 300px;
    float: left;
}        
.left { 
    background-color: red; 
    width: 300px;
}        
.center { 
    background-color: green;
    width: calc(100% - 600px);
}        
.right { 
    background-color: blue;
    width: 300px;        
}


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

calc()函数在圣杯布局中用法

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信