样式一:
body {undefined
margin: 0;
padding: 0;
line-height: 1.5em;
font-family: "Times New Roman", Times, serif;
font-size: 14px;
color: #000000;
background: #f2e7ca url(images/templatemo_body.jpg) top center no-repeat;
}
样式二:
body {undefined
background:#2f373a;
font-family:Arial,Helvetica,sans-serif;font-size:100%;
line-height:1em;color:#4e4e4e;
min-width:920px;
border-top:10px solid #0c0e0e
}
样式三:
body {undefined
font-family:Arial,Helvetica,sans-serif;
font-size:1em;
vertical-align:middle;
font-weight:normal
}
样式四:
body
{undefined
margin:0px;
padding:0px;
background-color:#E7EAEB;
font-family:"微软雅黑","黑体","宋体";
font-size:12px;
height:36px;
}
样式五:
body
{undefined
font: .8em Arial, Tahoma, Verdana;
background: #fff url(../images/bg.gif) repeat-x;
color: #777;
}
样式六:
body
{undefined
width:auto; margin-top:12px;
float:right; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
font-size:11px;
color:#999999;
line-height:25px;
letter-spacing:1px
}
样式七:
body
{undefined
width:auto;
margin-left:1px;
float:left;
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
color:#5f5f5f;
line-height:35px;
text-transform:uppercase
}
样式八:
body {undefined
background: #e1e5e8;
font-family: "Georgia", Tahoma, Sans-Serif;
font-size: 12px;line-height: 18px;
color: #888;
}
样式九:
body
{undefined
width:130px; height:20px;
background:url(images/servicesbg.gif) 0 0 repeat-x #68EF00;
color:#317400;
font:18px/14px Georgia, "Times New Roman", Times, serif;
margin:34px 0 0 37px;
}
样式十:
body
{undefined
display:block;
width:94px;
height:20px;
background: url(images/serviceslink1bg.gif) 0 72% no-repeat #6DFD00;
color:#01699F;
font:13px/20px Georgia, "Times New Roman", Times, serif; text-decoration:none;
}
样式十一:
body {undefined
margin: 0;
padding: 0;
line-height: 1.5em;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 12px;color: #33322e;background: #39443D url(images/templatemo_body_bg.jpg) repeat-x;
/* background: #47443c url(images/templatemo_body_bg_2.jpg) repeat-x; */
}
样式十二:
body {margin: 0;padding: 0;line-height: 1.5em;font-family: Tahoma, Geneva, sans-serif;font-size: 12px;color: #6f6f6f;
background: #2ac5c0 url(images/templatemo_body_top.jpg) repeat-x;
}
样式十三:
body {undefined
margin: 0;
padding: 0;
line-height: 1.5em;
font-family: Verdana, Geneva, sans-serif;font-size: 11px;
color: #ffffff;background: #005b7f;
}
样式十四:
body {undefined
margin: 0;
padding: 0;
line-height: 1.7em;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 12px;color: #333333;
background: #000000 url(images/templatemo_main_bg.jpg) repeat-y center;
}
样式十五:
body {undefined
margin: 0;
padding: 0;
line-height: 1.7em;
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;color: #707b84;
background: #3e464d;
}
样式十六:
body {undefined
margin: 0;
padding: 0;
line-height: 1.7em;
letter-spacing: 1px;
font-family: Georgia, "Times New Roman", Times, serif;font-size: 12px;
color: #333;
background: #e1d1d6 url(images/templatemo_body.png) repeat-x top;
}
样式十七:
body {undefined
margin: 0;
padding: 0;
line-height: 1.7em;
letter-spacing: 1px;
font-family: Georgia, "Times New Roman", Times, serif;font-size: 12px;
color: #333;
background: #e1d1d6 url(images/templatemo_body.png) repeat-x top;
}
样式十八:
body
{undefined
background:url(images/bg.gif) repeat #000000;
padding:0; font-family:arial, sans-serif; font-size:12px;
margin:0px auto auto auto;
color:#36322b;
}
样式十九:
body
{undefined
margin:0px;
padding:0px;
background:url(images/mainbg.gif) 0 0 repeat-x #F6F4E4;
color:#6B6854;
font:14px/18px "Trebuchet MS", Arial, Helvetica, sans-serif;
}
样式二十:
body
{undefined
font-family:Georgia;
font-family:Arial;
}
1、代表内联样式,如: style=””,权值为1000。
2、代表ID选择器,如:#content,权值为100。
3、代表类,伪类和属性选择器,如.content,权值为10。
4、代表类型(元素)选择器和伪元素选择器,如div p,权值为1。 按照CSS代码的执行先后顺序。如果有重复的规则,按照后执行的定义。最终规则是多个定义规则的综合。重点:高级规则定义对于不同表格的文字样式定义。(不同表格使用不同ID、使用类样式定义)一页中的多种超级链接样式定义。多个相同规则不同对象的CSS共同定义。对于同一对象定义的多种CSS方式考虑哪种更科学。
用于来定义一类可以在同一个页面内重复利用的样式。 如比较常用的.clearfix(一般是用于清除浮动),或者自己定义的用于新闻列表的样式,详细的写好链接、列表、边框以及背景等属性,有些人还会习惯把一些常用的属性作为一个类。
1、首先我们我们新建一个记事本,并将记事本的名字改为“引入外部css文件和外部js文件.html”,并回车键确定,以使文件转化为浏览器可以打开的html网页文件。
2、我们编写一个html5的声明标签—<!DOCTYPEhtml>,以使浏览器能认识到我们的文档是一个html5的文件,这样就可以快速的正确解读,以提高浏览的体验。
3、我们写一个<title>的标签,将网页的题目写入进去,让网页的标题显示为“引入外部css文件和外部js文件”。
4、我们用<meta>标签设置字符的编码格式为:UTF-8,以使浏览器能够正确的显示我们的网页。
5、我们写一个<body>标签,用来包含网页的主体部分。
6、我们写几个标签以便在外部css文件样式表中,为其设置样式。
7、我们新建一个css文件,把txt的文件后缀名改为css即可,之后打开就可以写入css代码了。
8、我们用标签选择器为<p>标签、<div>标签和<span>标签的内容设置样式。
9、我们使用,<link>标签将我们编写的css文件样式表文件其引入到我们当前的html文件中来。
10、我们鼠标右击在弹出的下拉菜单中,我们选择“在浏览器中打开”这一项。
11、我们看到我们编写的样式被应用到了标签中文字上,说明我们的css外部样式表文件引入成功。
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有