Stil textShadow Özellik
Örnek
Bir metne gölge ekleyin:
document.getElementById("demo").style.textShadow = "5px 5px 1px #ff0000, 10px 10px 1px #0000ff";
Tanım ve Kullanım
textShadow özelliği, bir metin için bir veya daha fazla gölge efekti ayarlar veya döndürür.
Tarayıcı Desteği
Property | |||||
---|---|---|---|---|---|
textShadow | Yes | 10.0 | Yes | Yes | Yes |
Sözdizimi
textShadow özelliğini döndürün:
object.style.textShadow
textShadow özelliğini ayarlayın:
object.style.textShadow = "none|h-shadow v-shadow blur color|initial|inherit"
Not: textShadow özelliği, metne bir veya daha fazla gölge ekler. Özellik, her biri 2 veya 3 uzunluk değeri ve isteğe bağlı bir renkle belirtilen, virgülle ayrılmış bir gölge listesidir. Atlanan uzunluklar 0'dır.
Mülk değerleri
Value | Description |
---|---|
none | No shadow is drawn. This is default |
h-shadow | Required. The position of the horizontal shadow. Negative values are allowed |
v-shadow | Required. The position of the vertical shadow. Negative values are allowed |
blur | Optional. The blur distance |
color | Optional. The color of the shadow. Look at CSS Color Values for a complete list of possible color values |
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: | Yok |
---|---|
Geri dönüş değeri: | Öğenin metnine uygulanan virgülle ayrılmış gölge efektleri listesini temsil eden bir Dize |
CSS Sürümü | CSS3 |
Daha fazla örnek
Örnek
Metin gölgesini döndür:
alert(document.getElementById("myP").style.textShadow);
İlgili Sayfalar
CSS eğitimi: CSS3 Metin Efektleri
CSS referansı: metin gölgesi özelliği
❮ Stil Nesnesi