英文css教程:Introduction CSS

2020-05-10 13:29:16易采站长站整理

What is the deal with Multiple Styles Cascading in One?

We did notice that there is a little problem with understanding this concept so we do need to add it to our CSS tutorial introduction. All style sheets will allow you to define info about style and the info can be given in various ways. You can specify styles in External Style Sheets, in an HTML element inside the web page or in one HTML element. There is a posibility to have more than one style defined for 1 HTML element. In this case we are faced with order cascading. Every style present will be read by the browser and cascade into one new styles sheet, which we can consider virtual. This is done by obeying a simple list of order defined by priority. The way you see an element will be given by the element with the highest priority. The order is:

1.Inline Style (defined inside the HTML element)
2.Internal Style Sheet (defined inside a tag)
3.External Style Sheet
4.Browser default settings.