CSS3 Books

Gasston, P. (2014) The Book of CSS3 – A Developer’s Guide to the Future of Web Design, Second Edition, No Starch Press

Download eBook PDF (PDF 9,446KB)
Download Source Code (ZIP 7,056KB)
Companion website: http://thebookofcss3.com/

CSS3 is the technology behind most of the eye-catching visuals on the Web. But the docs can be dry, murky, and full of dastardly caveats for inconsistent browser implementations.

This completely updated second edition of the best-selling Book of CSS3 distills the dense technical language of the CSS3 specification into plain English and shows you what CSS3 can do now, in all major browsers. You’ll find fully revised coverage of the updated syntax of gradients, grids, and flexible box layout, as well as all-new chapters on values and sizing, and graphical effects like filter effects and blend modes.

With an abundance of real-world examples and a focus on the principles of good design, The Book of CSS3 will help you expand your CSS skills, as you learn how to:

  • Style text with custom font choices, drop shadows, and other effects
  • Create, position, and resize background images on the fly
  • Spice up static web pages with event-driven transitions and animations
  • Apply 2D and 3D transformations to text and images
  • Use linear and radial gradients to create smooth color transitions
  • Take control of layout with grids, columns, and flexible alignment
  • Tailor a website’s appearance to every type of web-capable device

The companion website includes up-to-date browser compatibility charts, links to tutorials and resources, and live CSS3 examples.The Web can be an ugly place. Make it pretty with The Book of CSS3.

Chapter 1: Introducing CSS3
Chapter 2: Media Queries
Chapter 3: Selectors
Chapter 4: Pseudo-classes and Pseudo-elements
Chapter 5: Web Fonts
Chapter 6: Text Effects and Typographic Styles
Chapter 7: Multiple Columns
Chapter 8: Background Images
Chapter 9: Border and Box Effects
Chapter 10: Color and Opacity
Chapter 11: Gradients
Chapter 12: 2D Transformations
Chapter 13: 3D Transformations
Chapter 14: Transitions and Animations
Chapter 15: Flexible Box Layout
Chapter 16: Values and Sizing
Chapter 17: Grid Layout
Chapter 18: Blend Modes, Filters, and Masking
Chapter 19: The Future of CSS3
Appendix A: CSS3 Support in Current Major Browsers
Appendix B: Online Resources


Goldstein, A (2013) Learning CSS3 Animations and Transitions – A Hands-on Guide to Animating in CSS3 with Transforms, Transitions, Keyframe Animations, and JavaScript

Download eBook (PDF 14,176KB)
Download Code Source (ZIP 2,349KB)

For web developers building rich web and mobile applications, standards-based CSS3 offers powerful advantages over traditional Flash-based approaches – and since Apple’s immensely popular iPad and iPhone don’t support Flash, moving to CSS3 has become even more urgent. However, most CSS3 guides focus primarily on the basics, frustrating web developers who want to do sophisticated work. Learning CSS3 Animations and Transitions is the first book focused entirely on creating production-quality rich animations and transitions with CSS3. Leading web development trainer Alexis Goldstein covers everything web developers need to know, teaching through solid examples that help web professionals build their skills one step at a time. Readers will learn how to: *

  • Create 2D transforms that serve as the foundation for CSS3 animations
  • Use transitions to make changes come alive
  • Master essential keyframing techniques
  • Combine transitions, transforms, and parallax scrolling in immersive web experiences
  • Transform in 3D, and animate 3D transforms
  • Creating increasingly complex and Flash-style animations
  • Build powerfully effective interactive infographics with CSS3 and HTML5
  • And much more…

Table of Contents
1. Working with CSS3 Animations   
Intro to CSS3 Animations  
Summary of CSS3 Animation Tools    
HTML5 Boilerplate
Tools for Generating Vendor Prefixes
-prefix-free
Tools for Reviewing Browser Support
The Modernizr Library
Leveraging the Modernizr Library
CSS Fallbacks via Modernizr
The Default Message for Unsupported Browsers
Repeated CSS Property Definitions
Hardware Acceleration
Viewing Hardware-Accelerated Layers in Chrome
Viewing Hardware-Accelerated Layers in Safari
A Final Word on Working with CSS3 Animations

2. Building a Foundation with Transforms
Introducing Transforms 
Browser Support for transform
The transform Syntax
Transform Functions   
The Effect of Transform Functions on Surrounding Elements
rotate
scale
skew
translate
Adding a Fallback Message for Older Browsers
matrix
Building a Bicycle in CSS3 
Laying Out the Basic Skeleton
Creating Bicycle Wheels with border-radius
Drawing the Spokes
Drawing the Frame
Finishing the Bike with a Seat and Handlebars
Adding a Fallback Message for Older Browsers
Summary
Challenge

3. Animating Elements with Transitions 
Introduction to Transitions
Browser Support for transition
Creating a Simple Transition
The transition Shorthand Property
Triggering a Transition Animation with Hover Events
Transitioning Changes to the Background Color
Transitioning Changes to transform Values on Hover
Triggering a Transition Animation with Click Events    
Triggering the background-color Transition in a Mobile Environment
Triggering the translateX Transition in a Mobile Environment
Transition Properties    
transition-property
transition-duration
transition-timing-function
transition-delay
Spinning the Bike Wheels    
Animating the Bike to Move Across the Screen    
Spinning the Wheels as the Bike Moves
Triggering the Animation
Summary    
Challenge

4. Keyframe Animations    
Introduction to Keyframe Animations 
Browser Support for Keyframe Animations
Creating a Basic Keyframe
The Components of a Keyframe
Setting animation Properties
Using Percentages in Keyframe Selectors
Controlling a Keyframe Animation with Properties   
animation-fill-mode
animation-iteration-count
animation-direction
animation-delay
animation-play-state
The animation Shorthand Property
Animating a Recoiling Spring    
Creating the Keyframes for the Spring’s Compress and Recoil
Controlling the Animation’s Playback
Adding Additional Compress and Recoil Keyframes
Animating a Floating Balloon  
Applying Multiple Keyframe Animations to a Single Element
Adding a Fallback Message for Older Browsers
Summary    
Challenge

5. Creating 3D Effects with Parallax Scrolling    
Introduction to Parallax Scrolling    
A Three-Layer Parallax Scrolling Animation    
Creating the Background
Animating the Midground Sprite
Animating a Foreground Sprite
Animating Several Scenes with Parallax Scrolling    
The Animation’s Layout and Basic Styles    
The Animation’s Core HTML
Base Styles for the Page
Scene 1: Creating a Skateboarding Robot
The Background for Scene 1
Styling Scene 1’s Sprites
Moving Scene 1’s Elements Across the Screen
Triggering the Transitions via JavaScript
Scene 2: Moving Between Landscapes
Scene 2’s HTML and CSS
Scene 2’s JavaScript
Scene 3: Making the Robot Walk    
Scene 3’s HTML and CSS
Scene 3’s JavaScript
Summary   
Challenge

6. Adding Depth with 3D Transforms   
Introduction to 3D Transforms    
3D Transform Properties
Defining Transforms on All Three Axes
Browser Support for 3D Transforms
Drawing a 3D Cube    
Creating a Containing Element for the Scene
Rendering Nested Elements in 3D Space
Rotating the Faces of the Cube
Changing Depth with translateZ
Changing the Camera Angle with perspective-origin
Creating a House of Cards
Styling the Containing Element for the House of Cards
Positioning and Styling the Cards
Transforming the Cards
Adjusting the Ordering of the Stacked Cards
Adding a Pattern to the Card Backs
Summary    
Challenge   

7. Animating 2D and 3D Transforms    
Basic 3D Transform Animations with Transitions  
Adding HTML5 Sliders to Control Rotation
Rotating a 3D Object as the Slider Changes
Adding Basic Styles
Optimizing Performance   
Using Transitions Instead of Keyframe Animations to Improve Performance
Leveraging Hardware Acceleration with translate3d and translateZ
Blowing in the Wind: Animating Dandelion Seeds   
The Base HTML
Animating the Stem Blowing in a Gust of Wind
Placing and Animating the Seeds
Adding More Seeds
Animating Groups of Seeds
Summary    
Challenge  

8. Using Transitions and Transforms to Animate Text    
Introduction to the Typewriter Example    
The Animation’s Layout and Basic Styles   
The Animation’s Core HTML
Using a Custom Font with @font-face
Styling the Typewriter Roller and Paper Elements
Scene 1: Making the Quote Rise Up the Screen
Using Keyframe Animations to Move the Quote Upward
Chaining Together Multiple Keyframe Animations
Using JavaScript to Trigger the Animation
Revealing the Letters One at a Time with JavaScript and Keyframe Animations
Determining the Post-Typing Timing
Scene 2: Making Text Fall
Animating Falling Words
Triggering Scene 2’s Animation
Scene 3: Scrolling Text    
Scene 4: Growing Text   
Scene 5: Continuing the Animation
Moving the Second Part of the Quote Upward
Repeating the Turn of the Roller
Setting Up the Timing for the Rest of the Animation
Summary    
Challenge    

9. Building Flash-Style Animations with Keyframe Animations    
Introduction to the Meow Street Fat Cat Animation    
The Animation’s Layout and Basic Styles
The Basic HTML Elements for the Animation
The Basic Elements and Styling for Morgan the Cat
Setting Up Morgan’s Newspaper
Staggering the Scenes of the Animation with JavaScript
Scene 1: Moving the Newspaper    
Scene 2: Reading the Newspaper   
Combining Animations on Two Separate Elements
The Effect of Transforms on the Stacking Context and Containing Block
Scene 3: Moving to and Reading Page 2    
Scene 4: Moving the Animation Outside 
Zooming Out to a Larger Scene
Shrinking Morgan Down as You Zoom Out
Scene 5: Adding Murphy, the Toughest Cat Cop on the Beat   
HTML and Styling for Murphy the Police Cat
Using transform-origin to Align Pieces of Murphy
Scene 6: Knocking on Morgan’s Door    
Scene 7: Animating a Spinning Newspaper  
Hiding the Previous Scenes
Styling the Final Scene’s Newspaper
Spinning the Newspaper and Scaling It Up
Avoiding Pixelation by Scaling the Newspaper Down Initially
Support for Opera 12   
Defining Two Selectors for Each 3D Scene
Applying Further Fallbacks for Opera 12
Summary    
Challenge    

10. Creating Animated Infographics    
What Are Infographics?    
Image-Based Infographics
CSS3-Driven Infographics
Visualizing Data for Mixed Drinks 
The Base HTML for the Infographic
Creating the Base Page Styles
Base HTML for the First Drink Graphic
Default Drink Styles
Styling the Initial Ingredient
Animating the Ingredients Being Poured In
Styling the Remaining Ingredient
Fading in the Ingredients Labels
Adding a Second Drink
Adding the Remaining Drinks
Citing Data Sources
Supporting Older Browsers with Modernizr
Summary    
Challenge 

11. Building Interactive Infographics    
Creating an Element to Hold the Drink Recipes    
Styling the Drink Recipes
Hiding the Ingredients by Default
Unveiling the Recipe Page
Sliding in the Recipe Page
Making the Recipe Visible When the User Clicks a Drink
Determining the Recipe for the Selected Drink
Hiding an Old Recipe When a New Drink Is Clicked
Adjusting the recipes Element Placement for the Second Row of Drinks
Fading in the Recipe Text
Highlighting the Selected Ingredient  
Animating Changes to the Selected Ingredient
Triggering the Ingredient Highlight via jQuery
Ensuring Compatibility in Older Browsers
Changing the Cursor
Summary    
Challenge   


Bradley, S. (2014) CSS Animations and Transitions for the Modern Web, Adobe

Download Sample Chapter 4 (PDF 1,230KB)
Download Source Code (ZIP KB)

Modern websites use a variety of animated effects not only to improve usability but also to delight and surprise users. Some of these effects require complex scripting or programming skills, but many are within the grasp of designers who are already familiar with CSS and HTML. CSS Animations and Transitions for the Modern Web shows designers how to add movement to web pages over time using CSS3 style definitions.
Author Steven Bradley begins as simply as possible and uses elementary skills as the basis for more advanced techniques. Conceptual explanation is combined with specific examples to give designers a solid foundation in
the art of creating dynamic and appealing websites. Steven’s examples are posted at peachpit.com so readers can see the animations in action and download the code files for further study. Instructions for access are in the “Getting Started” section.
With CSS Animations and Transitions for the Modern Web, you’ll learn how to make your websites more vibrant and compelling with user interfaces that are functional, reliable, and usable, as well as beautiful.

  • Up-to-date information on current browser support for CSS animations and transitions
  • An introduction to manipulating web page objects in both 2D and 3D space
  • Techniques for creating smooth transitions between object states
  • An overview of Disney’s principles for creating realistic animation and how they apply to web page designs

Chapter 1: Introduction

  • Why CSS Animation is Important
  • Critical and Non-Critical Visual Experience
  • Tools: What you need

Chapter 2: Transforms

  • Browser Support
  • Fallbacks and PolyFills
  • CSS Visual Formatting Model
  • The Transform Rendering Model
  • 2-Dimensional Transforms
    • transform property
    • transform-origin property
  • 3-Dimensional Transforms
    • Perspective property
    • Perspective-origin property
    • Backface-visibility property
  • Transform Functions
    • 2-Dimensional Functions
      • matrix()
      • translate()
      • translateX()
      • translateY()
      • scale()
      • scaleX()
      • scaleY()
      • rotate()
      • skew()
      • skewX()
    • 3-Dimensional Functions
      • matrix3d()
      • translate3d()
      • translateZ()
      • scale3d()
      • scaleZ()
      • rotate3d()
      • rotateX()
      • rotateY()
      • rotateZ()
      • perspective()
    • Combining Transforms

Chapter 3: Transitions

  • Browser Support
  • Fallbacks and PolyFills
  • Transition Properties
    • Transition-property
    • Transition-duration property
    • Transition-timing-function property
      • ease
      • linear
      • ease-in
      • ease-out
      • ease-in-out
      • step-start
      • step-end
      • steps
      • cubic-bezier
    • Transition-delay property
    • Transition shorthand property
  • Starting and Reversing Transitions
  • CSS properties that can be transitioned
  • Transition Events

Chapter 4: Animation

  • Browser Support
  • Fallbacks and PolyFills
  • Keyframes
    • @Keyframes rule
  • Animation Behavior
    • Differences between animation and transitions
  • Animation Properties
    • animation-name property
    • animation-duration property
      • ease
      • linear
      • ease-in
      • ease-out
      • ease-in-out
      • step-start
      • step-end
      • steps
      • cubic-bezier
    • animation-timing-function property
    • animation-iteration-count property
    • animation-direction property
    • animation-play-state property
    • animation-delay property
    • animation-fill-mode property
    • Animation shorthand property
  • CSS Properties that can be animated
  • Animation Events
    • Animation-start
    • Animation-end
    • Animation-iteration

Chapter 5: Principles for More Realistic Animation

  • When to use Transitions and when to use animation
  • Disney’s Twelve principles of animation
    • Squash and stretch
    • Anticipation
    • Staging
    • Straight Ahead Action and Pose to Pose
    • Follow Through and Overlapping Action
    • Slow In and Slow Out
    • Arcs
    • Secondary Action
    • Timing
    • Exaggeration
    • Solid Drawing
    • Appeal

Chapter 6: Examples

End Matter

  • Resources

Teague, J. R. (2013) CSS3: Visual QuickStart Guide, Sixth Edition, Peachpit Press, Pearson

Download eBook PDF (PDF 17,756KB)

Download Source Code (ZIP KB) (Available from http://www.jasonspeaking.com/css3vqs)

Companion Web Site: http://www.jasonspeaking.com/css3vqs

CSS3 Video QuickStart (VLC Media Files .mp4)

001 – Getting the Right Tools (mp4 101,549KB) (File too large for upload)
002 – The HTML document (mp4 8,506KB)

embedded by Embedded Video
Download Video

003 – The Semantic Web (mp4 4,817KB)

embedded by Embedded Video
Download Video

004 – Adding Content (mp4 27,930KB)

embedded by Embedded Video
Download Video

005 – Adding Links, Navigation and Controls (mp4 25,564KB)

embedded by Embedded Video
Download Video

006 – Understanding Progressive Enhancement (mp4 13,094KB)

embedded by Embedded Video
Download Video

007 – Creating a Grid (mp4 26,624KB)

embedded by Embedded Video
Download Video

008 – Adding Space and Size (mp4 27,648KB)

embedded by Embedded Video
Download Video
009 – Controlling Typography (mp4 45,375KB)

embedded by Embedded Video
Download Video

010 – Adding Web Fonts (mp4 22,278KB)

embedded by Embedded Video
Download Video

011 – Adding a Splash of Colour (mp4 22,553KB)

embedded by Embedded Video
Download Video

012 – Styling borders and Backgrounds (mp4 28,617KB)

embedded by Embedded Video
Download Video

013 – Styling Links and Controls (mp4 21,093KB)

embedded by Embedded Video
Download Video

014 – Adding Transitions (mp4 14,228KB)

embedded by Embedded Video
Download Video

015 – Understanding Responsive Design (mp4 30,720KB)

embedded by Embedded Video
Download Video

016 – Using Contextual Styles (mp4 15,734KB)

embedded by Embedded Video
Download Video

017 – Using Media Queries (mp4 27,062KB)

embedded by Embedded Video
Download Video

018 – Planning an Adaptive Design (mp4 35,840KB)

embedded by Embedded Video
Download Video

019 – Choosing the Breakpoints (mp4 12,798KB)

embedded by Embedded Video
Download Video

020 – Adjusting Styles for Medium Screens (mp4 30,250KB)

embedded by Embedded Video
Download Video

021 – Adjusting Styles for Small Screens (mp4 57,263KB)

embedded by Embedded Video
Download Video

With CSS3: Visual QuickStart Guide, readers can start with a tour of the stylesheet language, or skip ahead to any chapter of the book to look up specific tasks covering just what they need to know. This task-based, visual reference guide uses step-by-step instructions, and plenty of screenshots to teach beginning and intermediate users CSS. Best-selling author Jason Cranford Teague takes readers through today’s CSS essentials and provides extensive coverage of CSS3 and CSS 2.1 techniques. The book outlines what can be done with CSS3 now and how the latest browsers have implemented many of the new features. Both beginning users, who want a thorough introduction to CSS, and more advanced users, who are looking for a convenient reference, will find what they need here in straightforward language and through readily accessible examples.

Table of Contents

Introduction
Chapter 1 Understanding CSS3
Chapter 2 HTML5 Primer
Chapter 3 CSS Basics
Chapter 4 Selective Styling
Chapter 5 Font Properties
Chapter 6 Text Properties
Chapter 7 Color and Background Properties
Chapter 8 List and Table Properties
Chapter 9 User Interface and Generated Content Properties
Chapter 10 Box Properties
Chapter 11 Visual Formatting Properties
Chapter 12 Transformation and Transition Properties
Chapter 13 Essential Design and Interface Techniques
Chapter 14 Responsive Web Design
Chapter 15 CSS Best Practices
Appendix A CSS Quick Reference
Appendix B HTML and UTF Character Encoding


McFarland, D. S. (2012) CSS3 – The Missing Manual, Third Edition, O’Reilly.

A more recent version of this book is available

Download eBook PDF (PDF 27,831KB)
Download Source Code (ZIP 4,123KB)

CSS3 lets you create professional-looking websites, but learning its finer points can be tricky—even for seasoned web developers. This Missing Manual shows you how to take your HTML and CSS skills to the next level, with valuable tips, tricks, and step-by-step instructions. You’ll quickly learn how to build web pages that look great and run fast on devices and screens of all sizes.

The important stuff you need to know:

  • Start with the basics. Write CSS3-friendly HTML, including the HTML5 tags recognized by today’s browsers.
  • Apply real-world design. Format text, create navigation tools, and enhance pages with graphics.
  • Make your pages lively. Create eye-catching animations and give your visitors attractive tables and forms.
  • Take control of page layouts. Use professional design techniques such as floats and positioning.
  • Look great on any device. Craft websites that adapt to desktop, tablet, and mobile browsers.
  • Get advanced techniques. Use CSS3 more effectively and efficiently, and ensure that your web pages look good when printed.

Table of Contents

  • Introduction;
  • How CSS Works;
  • The Benefits of CSS;
  • What You Need to Know;
  • HTML: The Barebones Structure;
  • Document Types;
  • How HTML Tags Work;
  • XHTML, Too;
  • HTML5: The Wheel Turns Again;
  • Software for CSS;
  • About This Book;
  • The Very Basics;
  • About the Online Resources;
  • Safari® Books Online;

Part 1: CSS Basics;

Chapter 1: HTML for CSS;

  • 1.1 HTML: Past and Present;
  • 1.2 Writing HTML for CSS;
  • 1.3 The Importance of the Doctype;
  • 1.4 Making Sure Internet Explorer Is Up-to-Date;

Chapter 2: Creating Styles and Style Sheets;

  • 2.1 Anatomy of a Style;
  • 2.2 Understanding Style Sheets;
  • 2.3 Internal Style Sheets;
  • 2.4 External Style Sheets;
  • 2.5 Tutorial: Creating Your First Styles;

Chapter 3: Selectors: Identifying What to Style;

  • 3.1 Tag Selectors: Page-Wide Styling;
  • 3.2 Class Selectors: Pinpoint Control;
  • 3.3 ID Selectors: Specific Page Elements;
  • 3.4 Styling Groups of Tags;
  • 3.5 Styling Tags Within Tags;
  • 3.6 Pseudo-Classes and Pseudo-Elements;
  • 3.7 Attribute Selectors;
  • 3.8 Child Selectors;
  • 3.9 Siblings;
  • 3.10 The :not( ) Selector;
  • 3.11 Tutorial: Selector Sampler;

Chapter 4: Saving Time with Style Inheritance;

  • 4.1 What Is Inheritance?;
  • 4.2 How Inheritance Streamlines Style Sheets;
  • 4.3 The Limits of Inheritance;
  • 4.4 Tutorial: Inheritance;

Chapter 5: Managing Multiple Styles: The Cascade;

  • 5.1 How Styles Cascade;
  • 5.2 Specificity: Which Style Wins;
  • 5.3 Controlling the Cascade;
  • 5.4 Tutorial: The Cascade in Action;

Part 2: Applied CSS;

Chapter 6: Formatting Text;

  • 6.1 Using Fonts;
  • 6.2 Using Web Fonts;
  • 6.3 Discovering Google Web Fonts;
  • 6.4 Adding Color to Text;
  • 6.5 Changing Font Size;
  • 6.6 Formatting Words and Letters;
  • 6.7 Adding Text Shadow;
  • 6.8 Formatting Entire Paragraphs;
  • 6.9 Styling Lists;
  • 6.10 Tutorial: Text Formatting in Action;

Chapter 7: Margins, Padding, and Borders;

  • 7.1 Understanding the Box Model;
  • 7.2 Controlling Space with Margins and Padding;
  • 7.3 Adding Borders;
  • 7.4 Coloring the Background;
  • 7.5 Creating Rounded Corners;
  • 7.6 Adding Drop Shadows;
  • 7.7 Determining Height and Width;
  • 7.8 Wrapping Content with Floating Elements;
  • 7.9 Tutorial: Margins, Backgrounds, and Borders;

Chapter 8: Adding Graphics to Web Pages;

  • 8.1 Discovering CSS and the Tag;
  • 8.2 Adding Background Images;
  • 8.3 Controlling Repetition;
  • 8.4 Positioning a Background Image;
  • 8.5 Using Background Property Shorthand;
  • 8.6 Using Multiple Background Images;
  • 8.7 Utilizing Gradient Backgrounds;
  • 8.8 Applying Easy Gradients with Colorzilla;
  • 8.9 Tutorial: Enhancing Images;
  • 8.10 Tutorial: Creating a Photo Gallery;
  • 8.11 Tutorial: Using Background Images;

Chapter 9: Sprucing Up Your Site’s Navigation;

  • 9.1 Selecting Which Links to Style;
  • 9.2 Styling Links;
  • 9.3 Building Navigation Bars;
  • 9.4 CSS-Style Preloading Rollovers;
  • 9.5 Styling Particular Types of Links;
  • 9.6 Tutorial: Styling Links;
  • 9.7 Tutorial: Creating a Navigation Bar;

Chapter 10: CSS Transforms, Transitions, and Animations;

  • 10.1 Transforms;
  • 10.2 Transitions;
  • 10.3 Animations;
  • 10.4 Tutorial;

Chapter 11: Formatting Tables and Forms;

  • 11.1 Using Tables the Right Way;
  • 11.2 Styling Tables;
  • 11.3 Styling Forms;
  • 11.4 Tutorial: Styling a Table;
  • 11.5 Tutorial: Styling a Form;

Part 3: CSS Page Layout;

Chapter 12: Introducing CSS Layout;

  • 12.1 Types of Web Page Layouts;
  • 12.2 How CSS Layout Works;
  • 12.3 Layout Strategies;

Chapter 13: Building Float-Based Layouts;

  • 13.1 Applying Floats to Your Layouts;
  • 13.2 Overcoming Float Problems;
  • 13.3 Tutorial: Multiple-Column Layouts;

Chapter 14: Responsive Web Design;

  • 14.1 Responsive Web Design Basics;
  • 14.2 Setting Up a Web Page for RWD;
  • 14.3 Media Queries;
  • 14.4 Flexible Grids;
  • 14.5 Fluid Images;
  • 14.6 Responsive Web Design Tutorial;
  • 15.1 How Positioning Properties Work;
  • 15.2 Powerful Positioning Strategies;
  • 15.3 Tutorial: Positioning Page Elements;

Part 4: Advanced CSS;

Chapter 16: CSS for the Printed Page;

  • 16.1 How Media Style Sheets Work;
  • 16.2 How to Add Media Style Sheets;
  • 16.3 Creating Print Style Sheets;
  • 16.4 Tutorial: Building a Print Style Sheet;

Chapter 17: Improving Your CSS Habits;

  • 17.1 Adding Comments;
  • 17.2 Organizing Styles and Style Sheets;
  • 17.3 Eliminating Browser Style Interference;
  • 17.4 Using Descendent Selectors;
  • 17.5 Trying Different CSS for Internet Explorer;

Part 5: Appendixes; CSS Property Reference; CSS Values;

  • Text Properties;
  • List Properties;
  • Padding, Borders, and Margins;
  • Backgrounds;
  • Page Layout Properties;
  • Animation, Transform, and Transition Properties;
  • Table Properties;
  • Miscellaneous Properties;
  • CSS Resources;
  • References;
  • CSS Help;
  • CSS Tips, Tricks, and Advice;
  • CSS Navigation;
  • CSS Layout;
  • Showcase Sites;
  • CSS Books; CSS Software;|

 

  • Introduction
  • Part 1: CSS Basics
    • Chapter 1: HTML for CSS
    • Chapter 2: Creating Styles and Style Sheets
    • Chapter 3: Selectors: Identifying What to Style
    • Chapter 4: Saving Time with Style Inheritance
    • Chapter 5: Managing Multiple Styles: The Cascade
  • Part 2: Applied CSS
    • Chapter 6: Formatting Text
    • Chapter 7: Margins, Padding, and Borders
    • Chapter 8: Adding Graphics to Web Pages
    • Chapter 9: Sprucing Up Your Site’s Navigation
    • Chapter 10: CSS Transforms, Transitions, and Animations
    • Chapter 11: Formatting Tables and Forms
  • Part 3: CSS Page Layout
    • Chapter 12: Introducing CSS Layout
    • Chapter 13: Building Float-Based Layouts
    • Chapter 14: Responsive Web Design
    • Chapter 15: Positioning Elements on a Web Page
  • Part 4: Advanced CSS
    • Chapter 16: CSS for the Printed Page
    • Chapter 17: Improving Your CSS Habits
  • Part 5: Appendixes
    • CSS Property Reference
    • CSS Resources

Lunn, I. (2013) CSS3 Foundations (Treehouse Book Series), John Wiley and Sons, Ltd.

Download eBook PDF (PDF 28,219KB)

Download Source Code (ZIP 20,822KB)

Companion Web Site: http://ianlunn.co.uk/portfolio/css3-foundations/

Master innovative and eye–catching website design with the exciting new Treehouse Series of books

Turn plain words and images into stunning websites with CSS3 and this beautiful, full–color guide. Taking web designers beyond the constraints of prebuilt themes and simple site–building tools, this new Treehouse book combines practicality with inspiration to show you how to create fully customized, modern websites that make viewers stop and stay.

The exciting new Treehouse Series of books is authored by Treehouse experts and packed with innovative design ideas and practical skill–building. If you′re a web developer, web designer, hobbyist, or career–changer, every book in this practical new series should be on your bookshelf.

  • Part of the new Treehouse Series of books, teaching you effective and compelling website development and design, helping you build practical skills
  • Provides career–worthy information from Treehouse industry pros and trainers
  • Explains the basics of cascading style sheets (CSS), such as how to structure with CSS, use CSS syntax, how to manipulate text, and visual formatting
  • Also covers the box model, how to animate page elements, cross–browser compatibility, and more

Leverage pages of dazzling website design ideas and expert instruction with a new Treehouse Series book.

Table of Contents

Introduction 3

Who Should Read This Book? 1

What You Will Learn 1

How to Use This Book 2

Using This Book with Treehouse 2

Part 1: Introduction

Chapter one Understanding CSS and the Modern Web 5

What Is the Modern Web? 5

What Is CSS? 6

The Role of CSS 6

Modern Browsers 10

Today’s Major Browsers 10

Browser Engines (Layout Engines) 11

Browser Usage Statistics 12

Older Browsers on the Modern Web 12

Tools for Building and Styling the Modern Web 15

Web Developer Tools 15

Text Editors 17

Summary 18

Chapter two Getting Started 19

Getting Started with the Project Files 20

Downloading the Project Files 20

Folder Structure and Good Practices 20

Understanding the HTML Template 22

Getting Started with CSS 30

Adding CSS to a Page 30

Using Media Types 31

Inline Styles 32

User Agent Stylesheets 33

Using a CSS Reset for Better Browser Consistency 34

Summary 38

Part 2: Learning CSS Syntax and Adding Presentational Styles

Chapter three Mastering The Power of CSS Selectors 41

Writing Your First Styles 41

Inheritance and the Relationship Between Elements 44

Selectors 45

Universal Selector 45

Type Selector 45

ID and Class Selectors 46

Grouping Selectors 47

Combinators 48

Descendant Combinators 48

Child Combinators 49

Sibling Combinators 49

Attribute Selectors 50

Selecting Elements with an Attribute, Regardless of Its Value 51

Selecting Elements with Multiple Attributes 51

Other Attribute Selectors 51

Pseudo-Classes 52

Dynamic Pseudo-Classes 52

Structural Pseudo-Classes 53

The Target Pseudo-Class 56

The UI Element States Pseudo-Classes 56

The Language Pseudo-Class 57

The Negation Pseudo-Class 57

Pseudo-Elements 58

Selecting the First Line 58

Selecting the First Letter 58

Generating Content Before and After an Element 59

Selector Specificity and the Cascade 60

The !important Rule 61

Summary 62

Chapter four Creating Styles Using Property Values 63

Color Keywords 63

Color Values 64

RGB (Hexadecimal) 64

RGB (Integer Range) 67

RGBA 67

HSL and HSLA 68

Code Challenge: Add More Colors to the Page 69

Units 69

Percentages 70

Units of Length 70

Absolute Units 70

Relative Units 71

Other Units 75

Summary 76

Chapter five Adding Presentational Styles 77

Using Experimental Properties Safely 79

Borders 81

border-color 81

border-style 82

border-width 83

border (Shorthand) 83

border-radius 84

Border Images 86

border-image-source 86

border-image-slice 87

border-image-width 88

border-image-repeat 88

border-image-outset 89

border-image (Shorthand) 90

box-shadow 91

Code Challenge: Add More Border and Box Shadow Styles 93

Backgrounds 93

background-color 93

background-image 94

background-repeat 96

background-position 97

background-attachment 98

Applying Multiple Background Images 98

Background Gradients 99

Linear Gradients 100

background-clip 102

background-origin 104

background-size 105

background (Shorthand) 106

CSS Image Replacement 107

Code Challenge: Add More Background Properties 108

opacity 108

visibility 109

cursor 111

outline (Shorthand) 111

content 112

Summary 113

Part 3: Building a Solid and Adaptable Page Structure

Chapter six Creating A Basic Page Structure 117

Structure Types 117

Fluid 118

Fixed 118

Hybrid Layout for Responsive Design 120

Fluid Images. 121

Adaptive Design 123

Mobile First Design 125

Summary 125

Chapter seven Creating Space and Understanding the Box Model 127

The Box Model 127

Using Web Developer Tools to Better Understand the Box Model 129

margin. 130

Code Challenge: Add More Margins to Elements 131

padding. 132

Code Challenge: Add More Padding to Elements 133

The Pitfall of the Box Model and Working Around It 134

box-sizing 136

Summary 139

Chapter eight Creating a Multicolumn Layout 141

float 142

clear 143

Floating Multicolumns 145

Code Challenge: Make the Footer Elements Float Side by Side 152

Summary 152

Chapter nine Understanding Display, Position, and Document Flow 153

Document Flow 153

display 155

block 155

Code Challenge: Make the Newsletter Labels Block-level 156

inline 157

inline-block 159

list-item 161

Displaying Tables 161

none 161

position, top, right, bottom, and left 162

static 162

relative 162

absolute 164

fixed 167

Code Challenge: Change the Position of the Quotes Around the Customer Testimonials Without Affecting the Flow 168

Using display, position, and z-index to Create a Drop-Down Menu. 169

z-index 173

Code Challenge: Apply z-index to Other Elements 174

vertical-align and Vertical Centering Techniques 175

vertical-align 175

Vertical Centering Techniques 177

The Fake Table Cells Technique 177

The Stretched Element Technique 179

The 50% Top Minus Half the Elements Height Technique 181

overflow 183

Summary 186

Part 4: Typography

Chapter ten Changing the Font 189

Choosing a Web Safe Font Using font-family and Font Stacks 190

font-family 191

Applying Fonts Using @font-face 192

Font Licenses and Third-Party Font Services 194

Google Web Fonts 194

Other Font Services 198

Summary 198

Chapter eleven Styling Fonts and Text 199

Styling Fonts 199

font-style 200

font-variant 200

font-weight 201

font-size 202

Keywords 203

Percentages 203

Absolute Length Units 203

Relative Units 203

Percentages versus Ems 205

line-height 206

font (Shorthand) 207

Code Challenge: Change the Style of More Fonts 208

Styling Text 209

color 209

text-decoration 209

text-transform 210

text-shadow 211

letter-spacing 212

word-spacing 213

direction 213

text-align 213

text-indent 215

white-space 215

overflow-wrap and word-wrap 216

Code Challenge: Change the Style of Various Text Elements 217

Styling Lists 217

list-style-type 217

list-style-image 219

list-style-position 219

list-style (Shorthand) 220

Summary 220

Part 5: Taking It to the Next Level with Transforms and Animations

Chapter twelve Adding 2D Transforms 223

Safely Using Experimental CSS3 Properties 223

transform and 2D Transform Functions 224

translate(), translateX(), and translateY() 225

rotate() 227

scale(), scaleX(), and scaleY() 228

skewX() and skewY() 228

matrix() 230

transform-origin 230

Summary 232

Chapter thirteen Going Beyond with 3D Transforms 233

perspective. 234

perspective-origin. 235

transform and 3D Transform Functions 235

translateZ() and translate3d() 235

rotateX(), rotateY(), rotateZ(), and rotate3d() 239

scaleZ() and scale3d() 241

Multiple 3D Transform Functions 243

transform-style 243

backface-visibility 245

Summary 246

Chapter fourteen Bringing Your Website to Life with Transitions and Animations 247

Animating Elements from A to B Using Transitions 247

transition-property 248

transition-duration 249

transition-timing-function 250

transition-delay 251

transition (Shorthand) 251

Making the Banner Transition Back to Its Normal State 252

Code Challenge: Make the Sidebar Sections Transition 253

Animating Elements from A to Z Using Keyframes 253

@keyframes 256

animation-name 258

animation-duration 258

animation-timing-function 259

animation-delay 260

animation-iteration-count 260

animation-direction 260

animation-play-state 261

animation-fill-mode 262

animation (Shorthand) 263

Creating a Cycling Image Showcase 264

Summary 267

Part 6: Preparing for Multiple Browsers and Devices

Chapter fifteen Testing Across Multiple Browsers 271

Vendor Prefixing the Easy Way 272

Testing Modern Browsers 276

Firefox 13 and Safari 5 276

Opera 11 and 12 277

Internet Explorer 10 277

Internet Explorer 9 280

Firefox 3.6 280

Testing Older Versions of Internet Explorer 280

Internet Explorer 8. 280

Conditional Comments for Internet Explorer 6, 7, and 8 283

Universal Internet Explorer 6 Stylesheet 287

Summary 288

Chapter sixteen Making Your Website Look Great Across Multiple Devices 289

Using Opera Mobile Emulator 290

Scaling the Viewport on Mobile Devices 292

Using Media Queries 294

Using Logical Operators 295

And 295

Or 295

Not 296

Only 296

width 296

Applying Styles to Specific Media Features 296

height 298

device-width 298

device-height 299

orientation 299

aspect-ratio 299

device-aspect-ratio 299

color, color-index, monochrome, resolution, scan, and grid 300

Adding Media Queries to Cool Shoes & Socks 300

Media Queries for Mobile Devices 300

Media Queries for Tablets and Narrow-Size Desktop Browsers 307

Summary 311

Chapter seventeen Final Steps and Conclusion 313

Final Steps 313

Removing Production Code and Preparing to Go Live 314

Testing, Testing, Testing 315

Going Live! Uploading to a Web Server 315

The Future Web 315

Index 317


Gillenwater, Z. M. (2011) Stunning CSS3: A Project-Based Guide to the Latest in CSS (Voices That Matter), New Riders, Peachpit Press

Download eBook PDF (PDF 12,024KB)

Download Source Code: http://www.stunningcss3.com/code/index.html

Companion Web Site: http://www.stunningcss3.com/

CSS3 adds powerful new functionality to the web’s visual style language to help you create beautiful and engaging designs more easily than ever. With CSS3, you can create eye-catching visual effects such as semitransparent backgrounds, gradients, and drop shadows without using images; display text in beautiful, unique, non-web-safe fonts; create animations without Flash; and customize a design to the user’s unique device or screen size without JavaScript.

You’ll learn how to accomplish these effects and more by working through a series of practical yet cutting-edge projects. Each chapter walks you through standalone exercises that you can integrate into projects you’re working on, or use as inspiration. You’ll learn all of the most popular, useful, and well-supported CSS3 techniques, plus:

  • How to use CSS3 to enhance your pages, not just in terms of looks, but also in terms of usability, accessibility, and efficiency
  • When and how to provide workarounds and fallbacks for older, non-supporting browsers
  • How to create stunning designs with unique typography and beautiful graphic details
  • Advanced new selectors to streamline your markup and make it less prone to human errors
  • New methods for creating multiple-column layouts
  • How to quickly and easily create mobile-optimized web designs without using scripting

Table of Contents

Chapter 1 The CSS3 Lowdown
Chapter 2 Speech Bubbles
Chapter 3 Notebook Paper
Chapter 4 Styling Images and Links by Type
Chapter 5 Improving Efficiency Using Pseudo-classes
Chapter 6 Different Screen Size, Different Design
Chapter 7 Flexing Your Layout Muscles
Appendix A Browser Support
Index


Powers, D. (2012) Beginning CSS3 (Expert’s Voice in Web Development), Apress

Download eBook PDF (PDF 30,669KB)

Download Source Code (ZIP 2,120KB)

Beginning CSS3 teaches you how to style web pages using Cascading Style Sheets (CSS)—the language of web design. Starting from first principles, you’ll learn through a series of practical exercises how to change the default look of HTML tags, adding color, backgrounds, and borders. The book demystifies core concepts, such as the CSS box model and selectors, giving you the confidence and knowledge to create innovative and flexible page layouts. You’ll also learn how to create rounded corners, drop shadows, and gradients without the need for images, using the latest CSS3 techniques.

What you’ll learn

  • Teaches how to style attractive and flexible web pages
  • Hands-on exercises demonstrate how to combine style rules for different effects
  • Comprehensive coverage of CSS2.1 and stable parts of CSS3

Who this book is for

Beginning CSS3 is aimed at web designers who want to master the use of Cascading Style Sheets to style and lay out modern web pages. It teaches core concepts, such as the CSS box model and choosing the most appropriate selectors to apply styles efficiently. This makes it an excellent choice for both complete beginners and web designers who want to improve their understanding of CSS.

Beginning CSS3 teaches you how to style web pages using Cascading Style Sheets (CSS) the language of web design. Starting from first principles, you’ll learn through a series of practical exercises how to change the default look of HTML tags, adding color, backgrounds, and borders. The book demystifies core concepts, such as the CSS box model and selectors, giving you the confidence and knowledge to create innovative and flexible page layouts. You’ll also learn how to create rounded corners, drop shadows, and gradients without the need for images, using the latest CSS3 techniques. What you’ll learn Teaches how to style attractive and flexible web pages Hands-on exercises demonstrate how to combine style rules for different effects Comprehensive coverage of CSS2.1 and stable parts of CSS3 Who this book is for Beginning CSS3 is aimed at web designers who want to master the use of Cascading Style Sheets to style and lay out modern web pages. It teaches core concepts, such as the CSS box model and choosing the most appropriate selectors to apply styles efficiently. This makes it an excellent choice for both complete beginners and web designers who want to improve their understanding of CSS. Table of Contents Introducing CSS – the Language of Web Design Using Basic Selectors Specifying Sizes, Colors, and Files Styling Text Embedding Web Fonts Understanding Layout with the CSS Box Model Floating Elements for Layout Adding Backgrounds Adding Borders and Drop Shadows Styling Lists and Navigation Menus Positioning Elements Precisely Cross-Browser Layout Techniques Using Advanced Selectors Styling Tables Generated Content Creating a Print Style Sheet Targeting Styles at Different Devices with Media Queries Using CSS3 Multi-Column Layout Creating Gradients Without images 2D Transformations and Transitions Animating Elements with CSS Keyframes What Next?

Table of Contents

  1. Introducing CSS – the Language of Web Design
  2. Using Basic Selectors
  3. Specifying Sizes, Colors, and Files
  4. Styling Text
  5. Embedding Web Fonts
  6. Understanding Layout with the CSS Box Model
  7. Floating Elements for Layout
  8. Adding Backgrounds
  9. Adding Borders and Drop Shadows
  10. Styling Lists and Navigation Menus
  11. Positioning Elements Precisely
  12. Cross-Browser Layout Techniques
  13. Using Advanced Selectors
  14. Styling Tables
  15. Generated Content
  16. Creating a Print Style Sheet
  17. Targeting Styles at Different Devices with Media Queries
  18. Using CSS3 Multi-Column Layout
  19. Creating Gradients Without images
  20. 2D Transformations and Transitions
  21. Animating Elements with CSS Keyframes
  22. What Next?