In the previous article, we used a template. The style sheets in the template are embedded. Some people may ask how to solve this problem if they are all external style sheets?
This umbraco is also doing well ~! First, we should make the same. Edit the style sheet or Javascript externally,
Then, some of them will be admitted.
For example, this is edited externally.
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "content-language" content = "ZH-CN"/>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> heand </title>
<Style>
# Content {
Width: 800px;
Height: 455px;
Background-color: #993333;
}
# Heand {
Height: 136px;
Width: 100%;
Background-color: # 0000ff;
}
# Left {
Height: 250px;
Width: 400px;
Background-color: # ccffcc;
Float: left;
}
# Right {
Height: 250px;
Width: 400px;
Float: right;
Background-color: # ff9966;
}
</Style>
</Head>
<Body>
<Div id = "content">
<Div id = "heand"> heand </div>
<Div id = "Left"> </div>
<Div id = "right"> </div>
</Div>
</Body>
</Html>
We first stick the style sheet out.
Open the settings-> stylesheets new key to a style sheet file.
Then paste the style sheet content.
Here, the <style> </style> label is no longer needed ~! Save the settings.
Next, open our main template: Put the rest of the content in.
The above sentence is a reference to the style sheet, which is shown in the right div below. My subtemplate content ~!
Save. Preview your page ~! Is it easy?
Let's talk about the reference of javascript:
The above is the same. Use other tools to write it out first. As follows:
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "content-language" content = "ZH-CN"/>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> heand </title>
<Script language = "JavaScript" type = "text/JScript">
Function AA (){
Alert ("hello ");
}
</SCRIPT>
</Head>
<Body onload = "AA ()">
<Div id = "content">
<Div id = "heand"> heand </div>
<Div id = "Left"> </div>
<Div id = "right"> </div>
</Div>
</Body>
</Html>
Next, open the settings-> scripts new key file. Note that
Select. JS File
Then we write the JavascriptCodePut it in,
<Script language = "JavaScript" type = "text/JScript"> </SCRIPT> is not required here ~! Save,
Then we reference it in the living template. The Code is as follows:
<SCRIPT src = "/scripts/BB. js" type = "text/JavaScript"> </SCRIPT>
Put it in the
<Body onload = "AA ()">
Call JavaScript;
Save and run our page again:
In this way, JavaScript calls and CSS calls are complete ~!
Next, I will introduce the application of XSLT. You are welcome to continue to pay attention to it. Please give us more comments.