我不太擅长编程移动网络布局等。
我写了这个:
HTML:
<div id="title">...</div>
JavaScript
$("#title").css("margin-left", "7%");
$("#title").css("margin-right", "7%");
var i = screen.width * 0.018 + "px"; // It would be 24.588 at resolution of 1366
$("#title").css("margin-top", i); // And i wanted to use 24.588px here
$("#title").css("margin-bottom", i); // and here.
Chrome 在左侧和右侧显示 div 边距,但不呈现顶部和底部 MARGINS ......