Webmaster Sitesi
Geri git   Webmaster Sitesi > Değişik Dillerde Webmaster Sitesi Forumları > English Webmaster Forum

What does "Cascade" mean in Cascading Style Sheets?

English Webmaster Forum forum başlığına What does "Cascade" mean in Cascading Style Sheets? konusunun bir özeti Question: What does "Cascade" mean in Cascading Style Sheets? Answer: Cascading Style Sheets or CSS are set up so that you can have many properties all affecting the same element. ...
Cevapla
 
  #1  
WS 24-12-2009, 18:11
Engineer Resmi
Mühendis
4. Rank
 
Blog Yazıları: 4
Standart What does "Cascade" mean in Cascading Style Sheets?

Question: What does "Cascade" mean in Cascading Style Sheets?

Answer:

Cascading Style Sheets or CSS are set up so that you can have many properties all affecting the same element. Some of those properties may conflict with one another. For example, you might set a font color of red on the paragraph tag and then later on set a font color of blue. How does the browser know which color to make the paragraphs? This is decided by the cascade.

Types of Style Sheets
There are three different types of style sheets:

Author Style Sheets
These are style sheets created by the author of the Web page. They are what most people think of when they think of CSS style sheets.
User Style Sheets
User style sheets are set by the user of the Web page. These allow the user to have more control over how the pages display.
User Agent Style Sheets
These are styles that the Web browser applies to the page to help display that page. For example, in XHTML, most visual user agents display the <em> tag as italicized text. This is defined in the user agent style sheet.
Properties that are defined in each of the above style sheets are given a weight. By default, the author style sheet has the most weight, followed by the user style sheet, and finally by the user agent style sheet. The only exception to this is with the !important rule in a user style sheet. This has more weight than the author's style sheet.

Cascading Order
To resolve conflicts, Web browsers use the following sorting order to determine which style has precedence and will be used:

First, look for all declarations that apply to the element in question, and for the assigned media type.
Then look at what style sheet it's coming from. As above, author style sheets come first, then user, then user agent. With !important user styles having higher precedence than author !important styles.
The more specific a selector is, the more precedence it will get. For example, a style on "div.co p" will have a higher precedence than one just on the "p" tag.
Finally, sort the rules by the order they were defined. Rules that are defined later in the document tree have higher precedence than those defined earlier. And rules from an imported style sheet are considered before rules directly in the style sheet.
WS
Cevapla


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler


Benzer Konuları Oku
Konu Konu Açan Forum Cevap Son Mesaj
crwZ - bLacKsTar styLe Crowzer vBulletin 1 12-02-2010 15:04

Bağlantı Kur, Contact, Forum Kullanım Sözleşmesi, Gizlilik ~ siteler hakkında Style By: Powered

Saat: 13:31

 
© Copyright. All Rights Reserved. Webmaster Sitesi, Dünya'nın çeşitli yerlerinden katılan kullanıcılardan oluşmaktadır. Yönetim olarak her konuyu incelesek de bazen gözümüzden kaçabilmektedir. Açılan konularda bir yanlışlık veya yasalara aykırı içerikler görürseniz bu Webmaster Sitesi'nin sorumluluğunda değildir. Bizzat paylaşımı yapan kişi veya kişilerin sorumluluğundadır. Böyle bir durumda Webmaster Sitesi sorumlu tutulamaz, yargılanamaz.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250