Today, I plan the UI of a project and review the theme knowledge in Asp.net 2.0:
1. theme is the app_themes under the root directory, which must be the name
2. Each sub-folder at the next level of app_themes is a theme
3. Each theme folder can contain skin files, CSS files, image files, XML files, script files, and subfolders.
Theme mainly describes the loading sequence of CSS styles and the loading sequence of skin files.
CSS style:
Under Asp.net 2.0, you can use theme and stylesheettheme settings in the page tag to specify the style. If repeated definitions appear, the execution sequence is as follows:
Tag-level style> theme Settings> page-level style> stylesheettheme settings
In fact, CSS styles are the same as those that appear later. this order appears because theme sets stylesheettheme to have different loading locations. in
Code
< Head ID = "Ctl00_head1" >
< Link Href = "App_themes/default/default.css" Type = "Text/CSS" REL = "Stylesheet" /> <! -- Stylesheettheme settings -->
< Style Type = "Text/CSS" > <! -- Page-level style -->
. Test
{
Width : 100% ;
}
</ Style >
< Link Href = "App_themes/default2/default.css" Type = "Text/CSS" REL = "Stylesheet" /> <! -- Theme settings -->
</ Head >
So it is not surprising that such order appears.
I also want to introduce it.Skin File. Here is a simple example:
(Name: skintest. Skin)
Code
< ASP: Label Runat = "Server" Width = "100" > </ ASP: Label >
< ASP: Label Runat = "Server" Skinid = "LBL" Width = "200" > </ ASP: Label >
1. The first line of definition will apply to all labels
2. The second line will apply a label indicating that skinid is LBL.
(Loading sequence: If theme is used, the skin file setting overwrites the local control setting. If stylesheettheme is used, the local control setting overwrites the stylesheettheme setting)
The enabletheming attribute indicates whether to enable the topic for the specified control. The default value is true.Most controls have this property. It is worth noting that when stylesheettheme is used to reference a topic, enabletheming settings do not disable the topic.
In the web. in the config configuration file, you can specify the default topic file <configuration>-<system. web>-<pages stylesheettheme = "default">. you can also set theme. we recommend that you use stylesheettheme to set the loading sequence. the page degree of freedom is relatively large. of course, it depends on the situation.
This is probably the case. Let's try again later.