我不擅長編程移動網頁佈局等。無法使用var設置頁邊距:JavaScript,CSS和jQuery
我寫這樣的:
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顯示在左側和右側的股利的利潤,但不會呈現頂部和底部MARGINS ...
'瀏覽器就會顯示在左側和右側的股利的利潤,但不會呈現頂部和bottom'。即使是左邊和右邊也不可能。 – Manoj