CKTIS / CSS
height — CSS svojstvo
`height` postavlja fizičku visinu okvira.
Verzija: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Sintaksa
auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>height postavlja fizičku visinu okvira.
Primjer nakon primjene mjeri obrubni okvir te pokazuje fizičku ili logičku os, a ne samo podršku parsera.
Prihvaćena gramatika je auto | <length-percentage [0,∞]> | min-content | max-content | fit-content | fit-content(<length-percentage [0,∞]>) | <calc-size()> | <anchor-size()>; globalne vrijednosti i dalje sudjeluju u kaskadi.
box-sizing mijenja sadržaj mjere, a logička svojstva slijede writing-mode.
Primjeri
<!doctype html>
<html lang="en"><meta charset="utf-8"><title>CKTIS CSS reference example</title>
<body><div class="probe">probe</div><pre id="result"></pre><script>
const x=document.querySelector(".probe");x.style.cssText="box-sizing:border-box;height:48px;width:20px";document.querySelector("#result").textContent="box-height="+Math.round(x.getBoundingClientRect().height)+"; computed="+getComputedStyle(x).height;
</script></body></html>Rezultat
box-height=48; computed=48px
Primjer je izveden lokalno u izoliranoj Chrome sesiji bez mreže; rezultat dolazi iz preglednikovog CSS API-ja.