Skip to content

Transition Property

Tetapkan properti peralihan

Sintaks

visual="transition:[value]"

Nilai

NilaiCSS OutputHuraian
nonetransition-property: noneTiada peralihan
alltransition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150msSemua properti
colorstransition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150msProperti warna
opacitytransition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150msKelegapan sahaja
shadowtransition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150msBayang sahaja
transformtransition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150msTransformasi sahaja

Contoh

html
<button visual="transition:all hover:bg:primary">Smooth hover</button>

Pratonton

Peralihan

visual="transition:all" - Perubahan properti yang lancar

Lihat Kod
html
<div layout="flex" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <button space="p:small" visual="bg:primary text:white rounded:small transition:all">transition:all</button>
</div>