Skip to content

Place Items

Pintasan untuk align-items dan justify-items

Sintaks

layout="place-items:[value]"

Nilai

NilaiCSS OutputHuraian
startplace-items: startJajar permulaan
endplace-items: endJajar hujung
centerplace-items: centerJajar tengah
stretchplace-items: stretchRegangkan item

Contoh

html
<div layout="grid place-items:center">Centered items</div>

Pratonton

Letakkan Item Tengah

layout="place-items:center" - Tengahkan semua item dalam sel grid mereka

123
Lihat Kod
html
<div layout="grid grid-cols:3 place-items:center" space="g:small p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium" style="height: 100px;">
  <span space="p:small" visual="bg:primary text:white rounded:small">1</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">2</span>
  <span space="p:small" visual="bg:primary text:white rounded:small">3</span>
</div>