Stil hizalamaSelf Özellik
Örnek
Kapsayıcıya sığacak şekilde esnek bir öğe içindeki öğelerden birinin hizalamalarını ayarlayın:
document.getElementById("myBlueDiv").style.alignSelf = "stretch";
Tanım ve Kullanım
alignSelf özelliği, esnek kap içindeki seçili öğe için hizalamayı belirtir.
Not: alignSelf özelliği, esnek kapsayıcının alignItems özelliğini geçersiz kılar.
Tarayıcı Desteği
Tablodaki sayılar, özelliği tam olarak destekleyen ilk tarayıcı sürümünü belirtir.
Webkit'in ardından gelen sayılar, bir önekle çalışan ilk sürümü belirtir.
Property | |||||
---|---|---|---|---|---|
alignSelf | 21.0 | 11.0 | 20.0 | 9.0 7.0 Webkit |
12.1 |
Sözdizimi
alignSelf özelliğini döndürün:
object.style.alignSelf
alignSelf özelliğini ayarlayın:
object.style.alignSelf = "auto|stretch|center|flex-start|flex-end|baseline|initial|inherit"
Mülk değerleri
Value | Description |
---|---|
auto | Default. The element inherits its parent container's align-items property, or "stretch" if it has no parent container |
stretch | The element is positioned to fit the conatiner |
center | The element is positioned at the center of the container |
flex-start | The element is are positioned at the beginning of the container |
flex-end | The element is positioned at the end of the container |
baseline | The element is positioned at the baseline of the container |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Teknik detaylar
Varsayılan değer: | Oto |
---|---|
Geri dönüş değeri: | Bir öğenin align-self özelliğini temsil eden bir String |
CSS Sürümü | CSS3 |
İlgili Sayfalar
CSS referansı: align-self özelliği
HTML DOM STYLE Referansı: alignContent özelliği
HTML DOM STYLE Referansı: alignItems özelliği