读书人

6.3在正题中添加CSS

发布时间: 2012-10-25 10:58:57 作者: rapoo

6.3在主题中添加CSS
在主题中添加CSS

如果在主题文件夹中添加CSS文件,则在页面应用主题时也会自动应用CSS。

SimpleStyle\SimpleSheet.css



页面显示:


注意:
使用CSS的好处是使加载页面的速度更快。
尽量不要通过修改控件属性来对控件进行格式化。使用<style>

1、在主题中添加多个CSS
<link href="App_Themes/StyleTheme/SimpleSheet.css" type="text/css" rel="stylesheet" />
<link href="App_Themes/StyleTheme/SimpleSheet2.css" type="text/css" rel="stylesheet" />
<link href="App_Themes/StyleTheme/SimpleSheet3.css" type="text/css" rel="stylesheet" />

2、使用CSS改变页面布局
使用CSS可以改变页面布局,所以使用主题可以控制页面布局

Float.css 放在主题中

html
{
background-color:Silver;
font:14px Arail,Sans-Serif;
}

#div1
{
float:left;
width:25%;
margin:15px;
padding:10px;
background-color:White;
}

#div2
{
float:left;
width:25%;
margin:15px;
padding:10px;
background-color:White;
}

#div3
{
float:left;
width:25%;
margin:15px;
padding:10px;
background-color:White;
}

ShowLayout.aspx


2011-4-28 15:02 danny

读书人网 >CSS

热点推荐