我左边有一个固定的侧栏,右边有一个内容区.有没有替代计算除calc()之外的内容宽度?我想要一个更安全的浏览器方法.
.left-sidebar {
width: 160px;
height: 100%;
border-right: 1px solid black;
position: fixed;
top: 72px;
}
.right-content {
position: absolute;
left: 160px;
top: 72px;
width: calc(100% - 160px);
overflow: hidden;
}
Run Code Online (Sandbox Code Playgroud) css ×1