CSS width calculation calc()

CSS width calculation calc()
needs to adapt the width under fixed layout during the project today. At this time, the left border is a fixed width of 300px; the content on the right is 100%-300px; but how to write it in CSS? Through research, I found that this is a new feature of css3 .

.admin_main{
    position: fixed;
    top: 60px;
    left: 300px;
    width: calc(100% - 300px);
    height: 100%;
    padding: 15px 15px 60px 15px;
}

Guess you like

Origin blog.csdn.net/Achong999/article/details/130522650