CSS铺满剩余空间

使用css计算即可:比如左边宽度是200px,右边则铺满剩余的宽度:width:calc(100% - 200px)

注意注意注意:100%以及后面的200px,二者与减号之间需要有空格

.left {
    background-color: gray;
    width: 200px;
    height: 100%;
}

.right {
    background-color: rgb(209, 205, 205);
    width: calc(100% - 200px);
    height: 100%;
}

你可能感兴趣的:(vue,css,css3,前端)