更新时间:2021-07-08 09:46:53
coverpage
Title Page
Copyright
Mastering CSS
Credits
About the Author
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
CSS Foundations
The anatomy of a rule set and the three types of style sheets
Dissecting a rule set
External style sheets
Embedded style sheets
Inline style sheets
The box model and block versus inline elements
The box model
Block level elements versus inline elements
Summary
Ramping Up
Text editors
Snippets
Multiple cursors
Syntax highlighting
Code suggestion
CSS reset
Loading Eric Meyer's CSS reset
Examining the CSS reset
Customizing the CSS reset
Chrome DevTools
How to open developer tools
Changing CSS inside the inspector
Using the console to find errors
Renaming elements — classes and IDs
Classes
Classifying multiple elements
IDs
Should we use classes or IDs?
Descendant selectors
Parent child and sibling elements
Creating descendant selectors
Calculating the weight of selectors
BEM
Creating a Page Layout with Floats
Float introduction–flowing text around images
The Shark movies page
The original purpose of floats
Using the clear property to solve basic problems with floats
Creating a multicolumn layout
Centering an element
Floating columns
Targeting .column using a pseudo class
Collapsed containers
Solving the problems of floats
Using the clear method
Using overflow property with hidden value
The float method
Clearfix hack
Creating Buttons with Modular Reusable CSS Classes and CSS3
Creating buttons with modular CSS
Different button types
Building standard buttons
Multiple classes
Changing the width of the buttons
Changing the border and font colors of the buttons
Positioning the button
Specificity rules
The weights of different selectors
The !important declaration
The universal selector
Reality of the point system
Transitions
Creating a hover state
Using the transition property
Vendor prefixes
Transforms
Applying a scale to our button
Using the translate function
Using the rotate value
Adding vendor prefixes and :focus states
Styling the call-to-action button
Adding the HTML
Positioning using CSS
Styling the button
Gradients
Using the ultimate CSS gradient generator