CSS代码语法 css 样式由选择符和声明组成,而声明又由属性和值组成,如下图所示: 选择符:又称选择器,指明网页中要应用样式规则的元素,如本例中是网页中所有的段(p)的文字将变成蓝色,而其他的元素(如ol)不会受到影响。 声明:在英文大括号“{}”中的的就是声明,属性和值之间用英文冒号“:”分隔。
转载
2019-08-28 10:48:00
344阅读
2评论
text-indent可以使得容器内首行缩进一定单位。比如中文段落一般每段前空两个汉字。可以这么写: p{ text-indent: 2em; /*em是相对单位,2em即现在一个字大小的两倍*/ } 如果font-size是12px的话,那么text-indent: 2em则缩进24px。 web标准推荐如下字体定义方法: body { font-family : "Lucida Gr...
转载
2008-08-05 01:39:00
165阅读
h1,h2,h3,h4 { color:#33FF33; }h1 { font-size:18px; }h2 { font-size:36px; }h3 { font-size:9px; }h4 { font-size:14px; }p { font-size:16px; }.n { tex...
转载
2010-12-12 17:28:00
102阅读
2评论
h1,h2,h3,h4 { color:#33FF33; }h1 { font-size:18px; }h2 { font-size:36px; }h3 { font-size:9px; }h4 { font-size:14px; }p { font-size:16px; }.n { tex...
转载
2010-12-12 17:28:00
99阅读
2评论
制作过网页的人都有为画线而烦恼的经历,先来认识一下“Border”(画边框),它是CSS的一个属性,用它可以给能确定范围的HTML标记(如TD、DIV等等)画边框,它可以定义边框线的类型、宽度和颜色,利用这个特性,可以制作一些特殊效果。下面把通过实例来说明其应用技巧。 1、给文本加边框 上面的示例中,给一段文字加了不同的边框,只是为了说明边框线的颜色、粗细是可变的。
目录一、Hello CSS二、CSS语法三、选择器1、元素选择器2、id选择器3、类选择器4、同时根据元素名和类名来选择四、注释五、CSS文件六、CSS优先级七、CSS基础1、尺寸2、背景3、文本4、字体5、鼠标样式6、表格7、边框8、内边距9、外边距10、边框模型11、超链状态12、隐藏八、CSS布局1、绝对定位2、相对定位3、浮动4、显示方式5、水平居中6、左侧固定7、垂直居中8、左右固定9、
转载
2024-01-26 10:23:11
106阅读
http://www.cnblogs.com/rainman/archive/2011/08/05/2128068.html
转载
精选
2012-06-10 19:29:15
722阅读
font-size: 12px line-height: 16px font-size: 14px line-height: 19px font-size: 16px line-height: 21px font-size: 18px line-height: 24px font-size: 20p ...
转载
2021-08-11 18:44:00
788阅读
2评论
#container { width:760px;margin: auto;border-left: #969696 solid 1px;border-right: #969696 solid 1px;}#header { width:760px; height:140px;backgroun...
转载
2010-12-19 15:52:00
416阅读
2评论
导入样式表 <style> @import url(XXX.css) </style> 导入样式表比链接样式表慢设计代码的结构
原创
2023-01-03 11:51:10
63阅读
#container { width:760px;margin: auto;border-left: #969696 solid 1px;border-right: #969696 solid 1px;}#header { width:760px; height:140px;backgroun...
转载
2010-12-19 15:52:00
329阅读
2评论
代码结构
1. browser mode: standard quirk(兼容旧site ie旧boxmodel)
2. specificity:某个p有自己的特性
p {color: black;}
p.intro {color: grey;}
p .intro 是指包含在p内class为intro的元素
p {backg
原创
2011-11-09 09:10:11
825阅读
空间名称和简介区域
#header 主体部分{height:89px;background:#3399CC}
#header div.lc 左背景图{background:url(temp1/hdl.jpg) no-repeat}
#header div.rc 右背景图{background:url(temp1/hdr.jpg) no-repeat top right}
#header d
转载
精选
2012-02-08 01:51:01
1247阅读
1.禁止div点击 //css属性: pointer-events: none; //或者定义属性,在js中添加: $(".原类名").addClass("新类名"); //js: //禁用 $.fn.disable = function () { $(this).addClass("disable
转载
2020-11-25 12:29:00
216阅读
2评论
#left-column { width:150px;height:850px; float:left;background-color:#999999;}#content { width:600px;height:850px; float:left;background-color:#FF0...
转载
2010-12-21 22:49:00
70阅读
2评论
css代码优化作用与意义 1、减少占用网页字节。在同等条件下缩短浏览器下载css代码时间,相当于加快网页打开速度2、便于维护。简化和标准化css代码让css代码减少,便于日后维护3、让自己写的css代码更加专业。 css优化方法 1、缩写css代码。2、排列css代码。3、同属性提取共用css选择器
转载
2020-12-09 20:26:00
160阅读
2评论
<!doctype html> <html> <head> <meta charset="utf-8"> <title>样式使用</title> <style> @import url("CSS3-3.css"); </style> </head> <body> <a href="http://ww ...
转载
2021-11-01 12:09:00
251阅读
2评论