CSS Mastery

Andy Budd, Simon Collison, Cameron Moll

出版社

friends of ED

出版时间

2006-02-13

ISBN

9781590596142

评分

★★★★★
书籍介绍
这并不一本教你速成CSS的书,而更像一次关于“如何像资深前端那样思考”的现场教学。全书的核心观点朴素却常被忽视:所有布局的根本只是定位、浮动与margin操纵三件事;真正决定代码质量的,是语义化标记与“非表现性”的命名——class名该描述内容是什么,而非它长什么样。书中对“classitis”(滥用class)的批评尤为尖锐,直指许多开发者从WYSIWYG编辑器继承下来的坏习惯。它适合那些已跨过入门、却困于IE兼容陷阱、渴望建立系统布局思维的读者重读;若你只想要一份最新技术速查手册,它或许会显得过时。但正是这种对“为什么这样写”的追问,让它在同类进阶书里保留了不可替代的价值。
AI导读
核心看点
  • 深入解析CSS三大核心:定位、浮动与margin操纵
  • 详解液态、弹性及混合布局的实现技巧与原理
  • 提供浏览器兼容性Bug的识别与修复实战方案
读者共识
  • 虽技术细节略显陈旧,但底层思维与概念解析极具价值
  • 作为进阶读物,清晰梳理了盒子模型与布局的关键逻辑
  • 翻译质量参差不齐,建议有能力的读者直接阅读英文原版
精彩摘录
  • "所有CSS布局的根本都是3个基本概念:定位、浮动、margin操纵。"
  • "在符合标准的浏览器中,如果元素的内容太大,它只会超出box之外。但是,IE会扩展整个元素(。。。-_-)"
  • "Meaningful markup provides the developer with several important benefits. Meaningful pages are much easier to work with than presentational ones. For example, say you need to change a quotation on a page. If the quotation is marked up correctly, it is easy to scan through the code until you find the"
  • "When naming your IDs and classes, it is important that you keep the names as “unpresentational” as possible. For instance, if you want all of your form notification messages to be red, you could give them a class of red. This is fine as long as there are no other red elements on the page. However, s"
  • "At the same time, they can be overused and even abused. Novice CSS authors often add classes to nearly everything in an attempt to get fine-grained control over their styles. Early WYSIWYG editors also had the tendency to add classes each time a style was applied. Many developers picked up this bad "
  • "In the preceding example, each element is identified as being part of a news story by using an individual news-related class name. This has been done to allow news headlines and text to be styled differently from the rest of the page. However, you don’t need all these extra classes to target each in"
  • "When browser manufacturers started to create standards-compliant browsers, they wanted to ensure backward compatibility. To accomplish this, they created two rendering modes: standards mode and quirks mode. In standards mode, the browser renders a page according to the specifications, and in quirks "
  • "With even a moderately complicated style sheet, it is likely that two or more rules will target the same element. CSS handles such conflicts through a process known as the cascade. The cascade works by assigning an importance to each rule. Author style sheets are those written by the site developers"
用户评论
网页设计进阶之作
让我更痛恨ie的书
赞呐...相比别的书讲出的关键内容又多了一点~
还是英文写的好,看大部分,弄清了很多概念!
这本书和那本《DOM Scripting》都是非常好的入门读物阿~直接给你最正宗的web开发技巧!
书内容不错,翻译真的太拗口,后面的 css hack那一章hack实现可以直接pass,太老了,基本将的都是ie5,6的hack技术,过时了,看下hack实现思路就行;
讲述清楚了学习css三大关键:盒子模型、定位、浮动。又讲述了诸多常见效果的实现方法,如三种布局法等等。
行文方式有点晕。
必读的一本书,不多说什么了
有点过时的技术,不过可以看看别的资深前端是如何思考和解决问题的。
下载
收藏