In each HTML tag, STYLE parameters are available, the CSS settings in the post,
For example : <.DIV STYLE="position:absolute; width:20px; height:20px".>
This is the use of CSS STYLE parameter set, note that the CSS string enclosed in quotation marks. CSS instructions are basically a value corresponding to a property name, and then different property names are separated by semicolons. With the need to use several properties at once, but as long as they can reach a task it would be nice.
The second usage announced between <.HEAD.> and <./HEAD.>
Way to use the <.STYLE.>.................<./STYLE.> declaration
For example :
<.HTML.>
<.HEAD.>
<.STYLE TYPE="text/css".>----------Specified as a CSS style, the other is text / javascript style
<./STYLE.>
<./HEAD.>
Other HTML content
All <.H1.> label will apply this setting.
If you want to set many labels are applied to the same group, use syntax similar to the following:
H1,H2,H3,FONT {.color:#FF0000; font-family:Arial.}
Such designated by the tag can be applied to the setting by adding comma.
The third usage, is writes in the <.STYLE.> label, but does not apply mechanically in any label
We only give it a name, when you want a volume label in the form, use CLASS parameter specifies the name.
For example :
.mainUser {.color:#0000AA; font-size:20px.}
So you set the group named mainUser. When you need to form this group set introduced in volume label with the CLASS parameter.
For example :
<.FONT CLASS=mainUser.>
Fourth kind of usage, was written in <.STYLE.> in volume label, but this use will be based on the volume label of the HTML ID value, and auto quote
For example :
#std {.color:#FF0000; font-size:20px.}
The line above, refers to the has ID value is any HTML labelled STD, it will apply this CSS. Of course, if the ID does not STD, you aren't going to use it. As in the following labels, automatically use this CSS:
<.FONT ID=std.>
Fifth use to first establish a good style, and then link
First lay the style deposit *. CSS document
Then to link to :
<.Link REL=stylesheet TYPE="text/css" HREF="檔名.css".>
*.CSS profiles that can be written into a Web page, to note is that this directive can only be used in <.HEAD.> a volume label.
The sixth way for collects places on file
Is similar with the second way, constructs the CSS style files first, between <.STYLE.> and <./STYLE.> add @import URL in the HTML files. This directive can only be used in <.STYLE.> a volume label. Benefits of doing so are several pages can share the same copy of the CSS profile, do not repeat per page.
Internet References:
將樣式表用到網頁上, [Online], Retrieved 4 Feb 2011.
URL: http://chinese-school.netfirms.com/csst3.htm
No comments:
Post a Comment