CSS: The Definitive Guide

Eric A. Meyer, Estelle Weyl

出版时间

2017-10-25

ISBN

9781449393199

评分

★★★★★
书籍介绍
Publisher: O'Reilly Media Release Date: October 2017 Pages: 1123 If you’re a web designer or app developer interested in sophisticated page styling, improved accessibility, and saving time and effort, this book is for you. This revised edition provides a comprehensive guide to CSS implementation, along with a thorough review of the latest CSS specifications. CSS is a constantly evolving language for describing the presentation of web content on screen, printers, speech synthesizers, screen readers, and chat windows. It is used by all browsers on all screen sizes on all types of IoT devices, including phones, computers, video games, televisions, watches, kiosks, and auto consoles. Authors Eric Meyer and Estelle Weyl show you how to improve user experience, speed development, avoid potential bugs, and add life and depth to your applications through layout, transitions and animations, borders, backgrounds, text properties, and many other tools and techniques. This guide covers: Selectors, specificity, and the cascade Values, units, fonts, and text properties Padding, borders, outlines, and margins Colors, backgrounds, and gradients Floats and positioning tricks Flexible box layout The new Grid layout system 2D and 3D transforms, transitions, and animation Filters, blending, clipping, and masking Media and feature queries
AI导读
核心看点
  • 全面覆盖CSS规范,深入解析布局与定位原理
  • 详解Flex、Grid等现代CSS特性及动画过渡
  • 剖析浏览器兼容性问题与底层渲染机制
适合谁读
  • 追求精通CSS底层原理的前端开发者
  • 需要查阅CSS属性细节的资深设计师
  • 希望提升网页可访问性与性能优化的工程师
读前提醒
  • 作为工具书查阅,不建议从头到尾通读
  • 结合代码实例理解抽象概念,避免枯燥
  • 注意部分旧版内容需对照最新规范验证
读者共识
  • 前端必读经典,内容系统且解释透彻
  • 适合进阶学习,零基础读者可能感到晦涩
  • 虽篇幅巨大,但作为字典查阅价值极高

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • "左浮动元素的右外边界不会在其右边右浮动元素的左外边界的右边。一个右浮动元素的左外边界不会在其左边任何左浮动元素的右外边界的左边"
  • "引入css外部文件的两种方法为在html页面通过link,src属性(注意空链接时的陷阱!),再者是通过CSS文件本身通过@import url()引入,虽然这两种方式都可以加载进来CSS文件,可是link和@import也存在着细微的差别。 隶属上的差别 link属于XHTML标签,而@import完全是CSS提供的一种方式。link标签除了可以加载CSS外,还可以做很多其它的事情,比如定义RSS,定义rel连接属性等,@import就只能加载CSS了。此处注意浏览器的link src为空时候时会导致页面加载次数增多。 @import次数限制 传闻在IE6下,@import只能引入31次cs"
  • "First, however, let’s consider em and ex. In CSS, one “em” is defined to be the value of font-size for a given font."
  • "内容的背景也会应用到内边距"
  • "正常流中块级元素框的水平部分总和就等于父元素的width"
  • "如果一个块级正常流元素的height设置为一个百分数,这个值则是包含块height的一个百分数。 ... 将元素垂直居中的唯一办法就是把上下外边距都设置为25%"
  • "如果一个元素是初始包含块叠放上下文的一部分,而且其z-index值为负 ...好多字... **body元素为其后代建立了一个包含块。作为body元素后代的一个绝对定位就不能叠放在body的背景之下**(这句话错!) ...好多字... 所以z-index值为负时会导致不可预料的后果,所以使用的时候要小心。"
  • "在IE7之前的版本中,不同平台的Internet Explorer都不能正确地处理多类选择器。"
作者简介
Eric A. Meyer is the author of the critically acclaimed online tutorial Introduction to HTML, as well as some other semi-popular Web pages. He is a member of the CSS&FP Working Group and the author of Cascading Style Sheets: The Definitive Guide. Estelle Weyl is a front-end engineer who has been developing standards-based accessible websites since 1999. She writes two technical blogs pulling millions of visitors, and speaks about CSS3, HTML5, JavaScript and mobile web development at conferences around the world.
用户评论
CSS 不少东西还是动态学习比较好,经常看了很多东西结果来一句大部分浏览器不支持真是弄得我一言难尽啊。。。 图片在这里:https://github.com/meyerweb/csstdg4figs
这种工具书就不应该从头看到尾。以知识块形式去学习,或者是遇到问题再来查阅应该会比较好,结合实际的demo理解记忆都更深刻些。从头看到尾实在太痛苦了。
手头必备工具书
一千七百多页的大部头啊,中午读完了,赞一个!
可以通读一边的字典。时隔10年这一版终于跟上了CSS3的步伐。对于Flex、Grid、过渡与动画部分等新玩意逐属性地解释了功能。看完有了印象之后,查MDN文档快不少。
收藏