CSS -teksskadu- eienskap
Voorbeeld
Basiese teks-skadu:
h1
{
text-shadow: 2px 2px #ff0000;
}
Meer "Probeer dit self" voorbeelde hieronder.
Definisie en gebruik
Die text-shadow
eiendom voeg skaduwee by teks.
Hierdie eienskap aanvaar 'n komma-geskeide lys van skaduwees wat op die teks toegepas moet word.
Standaard waarde: | geen |
---|---|
Geërf: | ja |
Animateerbaar: | ja. Lees oor animeerbaar |
Weergawe: | CSS3 |
JavaScript-sintaksis: | voorwerp .style.textShadow="2px 5px 5px rooi" |
Blaaierondersteuning
Die nommers in die tabel spesifiseer die eerste blaaierweergawe wat die eiendom ten volle ondersteun.
Property | |||||
---|---|---|---|---|---|
text-shadow | 4.0 | 10.0 | 3.5 | 4.0 | 9.6 |
CSS-sintaksis
text-shadow: h-shadow v-shadow blur-radius color|none|initial|inherit;
Let wel: Om meer as een skaduwee by die teks te voeg, voeg 'n kommageskeide lys skaduwees by.
Eiendomswaardes
Value | Description | Play it |
---|---|---|
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-radius | Optional. The blur radius. Default value is 0 | |
color | Optional. The color of the shadow. Look at CSS Color Values for a complete list of possible color values | |
none | Default value. No shadow | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Meer voorbeelde
Voorbeeld
Teks-skadu met 'n vervaag effek:
h1 {
text-shadow: 2px 2px 8px #FF0000;
}
Voorbeeld
Teks-skadu op 'n wit teks:
h1 {
color: white;
text-shadow: 2px 2px 4px #000000;
}
Voorbeeld
Teks-skadu met 'n rooi neon gloed:
h1 {
text-shadow: 0 0 3px #FF0000;
}
Voorbeeld
Teks-skadu met 'n rooi en blou neon gloed:
h1 {
text-shadow: 0 0 3px #FF0000, 0 0 5px #0000FF;
}
Verwante bladsye
CSS-tutoriaal: CSS Text Shadow
HTML DOM verwysing: textShadow eiendom