日期:2014-05-17  浏览次数:20686 次

css编写

?

a:link{color:#000000; text-decoration:none;}

a:hover{color:#000000; text-decoration:none;}

a:active{color:#000000; text-decoration:none;}

a:visited{color:#000000; text-decoration:none;}

?

定义某个层下面的某个标签

.menu2 a:link,.menu2 a:visited{}

?

定义某个层下面的某个标签的某个标签

.box li a:visited {}

?

?

?

//qq新闻内容css

text-indent: 2em;

line-height: 25px;

margin: 20px auto 0 auto;

?

在富文本编辑器的p应该给与的格式。

h5, p, pre, table, form {

margin: 10px 0;

}

?

?

首先制作一个16x16的icon图标,命名为favicon.ico,放在根目录下。然后将下面的代码嵌入head区:?

<link rel="icon" href="/favicon.ico" type="image/x-icon" />?

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

?

web标准推荐如下字体定义方法:?

body { font-family : "Lucida Grande", Verdana, Lucida, Arial, Helvetica, 宋体,sans-serif; }

字体按照所列出的顺序选用。如果用户的计算机含有Lucida Grande字体,文档将被指定为Lucida Grande。没有的话,就被指定为Verdana字体,如果也没有Verdana,就指定为Lucida字体,依此类推

Lucida Grande字体适合Mac OS X;

Verdana字体适合所有的Windows系统;

Lucida适合UNIX用户

"宋体"适合中文简体用户;

如果所列出的字体都不能用,则默认的sans-serif字体能保证调用;

?

CSS中用四个伪类来定义链接的样式,分别是:a:link、a:visited、a:hover和a : active,例如:?

a:link{font-weight : bold ;text-decoration : none ;color : #c00 ;}?

a:visited {font-weight : bold ;text-decoration : none ;color : #c30 ;}?

a:hover {font-weight : bold ;text-decoration : underline ;color : #f60 ;}?

a:active {font-weight : bold ;text-decoration : none ;color : #F90 ;}?

以上语句分别定义了 "链接、已访问过的链接、鼠标停在上方时、点下鼠标时"的样式。注意,必须按以上顺序写,否则显示可能和你预想的不一样。记住它们的顺序是“LVHA”

?

制作好的网站可以到w3c进行标准校正?

http:validator.w3.org?

http://jigsaw.w3.org/css-validator/

?

为搜索引擎准备的内容

允许搜索机器人搜索站内所有链接。如果你想某些页面不被搜索,推荐采用robots.txt方法

<meta content="all" name="robots" />

设置站点作者信息

<meta name="author" content="ajie@netease.com,阿捷" />

设置站点版权信息

<meta name="Copyright" content="www.w3cn.org,自由版权,任意转载" />

站点的简要介绍(推荐)

<meta name="description" content="新网页设计师。web标准的教程站点,推动web标准在中国的应用" />

站点的关键词(推荐)

<meta name="keywords" content="designing, with, web, standards, xhtml, css, graphic, design, layout" ?/>

?

MARGIN是指层的边框以外留的空白,用于页边距或者与其它层制造一个间距。"

PADDING是指层的边框到层的内容之间的空白。

BORDER是指层的边框,"BORDER-RIGHT: #CCC 2px solid;"是定义层的右边框颜色为"#CCC",宽度为"2px",样式为"solid"直线。如果要虚线样式可以用"dotted"。

?

横向居中margin:0 auto;

?

盒模型主要定义四个区域:内容(content)、边框距(padding)、边界(border)和边距(margin)。