2013年4月25日

Images, Tables, and Mysterious Gaps

摘要: 原文地址:http://devedge.primedirective.net/viewsource/2002/img-table/Almost no matter when you started creating Web pages, odds are pretty high you have one or more designs based on the classic "convoluted tables and lots of images" paradigm. Whether you've sliced up a logo so it fits in w 阅读全文

posted @ 2013-04-25 17:33 BigPalm 阅读(193) 评论(0) 推荐(0) 编辑

第7章 紧凑而坚固的页面保证:以严格和混合的标记组成的结构

摘要: 1. div和span div和span元素,再加上id和class属性,提供了一个把结构添加到文档的通用机制; div是一个“一个增加结构的通用机制”; id和class的定义应该是有意义或元结构的名字,如果你养成习惯给一些页面核心组件命名,你就会抛弃从页面表现层进行思考和开发的习惯了; 一个id值必须以一个字母或者下划线开头,它不能以一个数字开头。W3C的校验服务可能不会捕获这个错误,而一些XML处理器可以。由于一些老CSS2.0实现中的限制,在class和id中使用下划线也不是好主意; div配合有意义的id和class可以提供语义信息。2. 混合布局和简洁的标记 使用表格并... 阅读全文

posted @ 2013-04-25 17:32 BigPalm 阅读(172) 评论(0) 推荐(0) 编辑

CSS 常见继承属性

摘要: 继承性:“后代元素”继承“祖先元素”属性设置的性能1.字体属性:font-family;font-size;font-weight;font-variant;font-style;2.文本属性:text-align;text-indent;line-height;letter-spacing;word-spacing;text-transform;direction;3.列表属性:list-style-type;list-style-image;list-style-position;4.其他visibility;color;cursor; 阅读全文

posted @ 2013-04-25 16:45 BigPalm 阅读(213) 评论(0) 推荐(0) 编辑

Unitless line-heights

摘要: line-height<ul> <li>I'm a list item with <small>small text</small>.</li></ul>ul {font-size: 15px; line-height: 1em;}li {font-size: 10px;}small {font-size: 80%;} li将继承ul的line-height:15px,为15px(15px*1),small的line-height也为15pxul {font-size: 15px; line-height: 1;} 阅读全文

posted @ 2013-04-25 16:23 BigPalm 阅读(206) 评论(0) 推荐(0) 编辑

导航