Using adaptive less width

@baseWidth:1980px;

.pxfix(@w){
    width:(@w/@baseWidth)*100vw;
}
.testWidth{
    .pxfix(100);
    height: 100px;
    background:red;
}

Directly on the code, a simple function, passing px value to be set, is 1980 wide design draft

Guess you like

Origin www.cnblogs.com/llcMite/p/11521715.html