HBCMS更多的中文手册参考:

@import Rule

DHTML文档教程

Imports an external style sheet.

dhtml语法

HTML@import [url] ( sUrl ) ;
ScriptingN/A

DHTML可能的值

sUrlString that specifies the URL that references a cascading style sheet.

Remarks

The rule has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

the semicolon in the syntax is required; if omitted, the style sheet is not imported properly and an error message is generated. "url()" is optional because there is always a url following "@import."

the @import rule, like the link element, links an external style sheet to a document. this helps the web author establish a consistent "look" across multiple HTML pages. Whereas the link element specifies the name of the style sheet to import using its href attribute, the @import rule specifies the style sheet definition inside a link element or a style element. in the scripting model, this means the owningelement property of the style sheet defined through the @import rule is either a style or a link object.

the @import rule should occur at the start of a style sheet, before any declarations. although internet explorer 4.0 and later allows @import rule statements to appear anywhere within the style sheet definition, the rules contained within the @import rule style sheet are applied to the document before any other rules defined for the containing style sheet. this rule order affects expected rendering.

rules in the style sheet override rules in the imported style sheet.

Examples

The following example uses the @import rule to import a style sheet. For the example to work, you must replace URL in the example code with the address of a style sheet.

<STYLE TYPE="text/css">
@import url("URL");
P {color:blue}
</STYLE>

The following example, without url(), has the same effect as the previous example.

<STYLE type="text/css">
@import "URL";
P {color:blue}
</STYLE>

是否符合公共标准

This rule is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Non-Microsoft link.

更多语法参考

imports, :link, style, styleSheet