我試圖改變我的h1的填充,通過檢測我的頁面高度,我會改變它,如果我的屏幕高度 700:800像素,但我的代碼不工作:(jquery如果statment檢測到的高度
if ($('.background-wrapper').height() <= 800 && $('.background-wrapper').height() >= 700) {
$(".login > background-wrapper > h1").css("padding-top", "50px")
}
HTML:
<div class="background-wrapper">
<div class="container">
<div class="row">
<h1> CRM INTERACTIVE MAP SYSTEM</h1>
</div>
</div>
</div>
你不使用CSS媒體查詢此的原因嗎? – CBroe