Can we define min-margin and max-margin, max-padding and min-padding in css?

后端 未结 19 1480
情话喂你
情话喂你 2021-01-31 01:01

Can we define min-margin and max-margin, max-padding and min-padding in CSS ?

19条回答
  •  隐瞒了意图╮
    2021-01-31 01:56

    var w = window.innerWidth;
    var h = window.innerHeight;
    if(w < 1116)
        document.getElementById("profile").style.margin = "25px 0px 0px 975px";
    else
        document.getElementById("profile").style.margin = "25px 0px 0px 89%";
    

    Use code above as an example of how to set min-margin and padding

提交回复
热议问题