The Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified
Book created for educational purposes and is not affiliated with group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners
https://goalkicker.com/
章節目錄
1-1
Content list
1-2
About
1-3
Chapter 1: Getting started with CSS
1-4
Section 1.1: External Stylesheet
1-5
Section 1.2: Internal Styles
1-6
Section 1.3: CSS @import rule (one of CSS at-rule)
1-7
Section 1.4: Inline Styles
1-8
Section 1.5: Changing CSS with JavaScript
1-9
Section 1.6: Styling Lists with CSS
1-10
Chapter 2: Structure and Formatting of a CSS Rule
1-11
Section 2.1: Property Lists
1-12
Section 2.2: Multiple Selectors
1-13
Section 2.3: Rules, Selectors, and Declaration Blocks
1-14
Chapter 3: Comments
1-15
Section 3.1: Single Line
1-16
Section 3.2: Multiple Line
1-17
Chapter 4: Selectors
1-18
Section 4.1: Basic selectors
1-19
Section 4.2: Attribute Selectors
1-20
Section 4.3: Combinators
1-21
Section 4.4: Pseudo-classes
1-22
Section 4.5: Child Pseudo Class
1-23
Section 4.6: Class Name Selectors
1-24
Section 4.7: Select element using its ID without the high specificity of the ID selector
1-25
Section 4.8: The :last-of-type selector
1-26
Section 4.9: CSS3 :in-range selector example
1-27
Section 4.10: A. The :not pseudo-class example & B. :focus-within CSS pseudo-class
1-28
Section 4.11: Global boolean with checkbox:checked and ~ (general sibling combinator)
1-29
Section 4.12: ID selectors
1-30
Section 4.13: How to style a Range input
1-31
Section 4.14: The :only-child pseudo-class selector example
1-32
Chapter 5: Backgrounds
1-33
Section 5.1: Background Color
1-34
Section 5.2: Background Gradients
1-35
Section 5.3: Background Image
1-36
Section 5.4: Background Shorthand
1-37
Section 5.5: Background Size
1-38
Section 5.6: Background Position
1-39
Section 5.7: The background-origin property
1-40
Section 5.8: Multiple Background Image
1-41
Section 5.9: Background Attachment
1-42
Section 5.10: Background Clip
1-43
Section 5.11: Background Repeat
1-44
Section 5.12: background-blend-mode Property
1-45
Section 5.13: Background Color with Opacity
1-46
Chapter 6: Centering
1-47
Section 6.1: Using Flexbox
1-48
Section 6.2: Using CSS transform
1-49
Section 6.3: Using margin: 0 auto;
1-50
Section 6.4: Using text-align
1-51
Section 6.5: Using position: absolute
1-52
Section 6.6: Using calc()
1-53
Section 6.7: Using line-height
1-54
Section 6.8: Vertical align anything with 3 lines of code
1-55
Section 6.9: Centering in relation to another item
1-56
Section 6.10: Ghost element technique (Michał Czernow's hack)
1-57
Section 6.11: Centering vertically and horizontally without worrying about height or width
1-58
Section 6.12: Vertically align an image inside div
1-59
Section 6.13: Centering with fixed size
1-60
Section 6.14: Vertically align dynamic height elements
1-61
Section 6.15: Horizontal and Vertical centering using table layout
1-62
Chapter 7: The Box Model
1-63
Section 7.1: What is the Box Model?
1-64
Section 7.2: box-sizing
1-65
Chapter 8: Margins
1-66
Section 8.1: Margin Collapsing
1-67
Section 8.2: Apply Margin on a Given Side
1-68
Section 8.3: Margin property simplification
1-69
Section 8.4: Horizontally center elements on a page using margin
1-70
Section 8.5: Example 1:
1-71
Section 8.6: Negative margins
1-72
Chapter 9: Padding
1-73
Section 9.1: Padding Shorthand
1-74
Section 9.2: Padding on a given side
1-75
Chapter 10: Border
1-76
Section 10.1: border-radius
1-77
Section 10.2: border-style
1-78
Section 10.3: Multiple Borders
1-79
Section 10.4: border (shorthands)
1-80
Section 10.5: border-collapse
1-81
Section 10.6: border-image
1-82
Section 10.7: Creating a multi-colored border using border-image
1-83
Section 10.8: border-[left|right|top|bottom]
1-84
Chapter 11: Outlines
1-85
Section 11.1: Overview
1-86
Section 11.2: outline-style
1-87
Chapter 12: Overflow
1-88
Section 12.1: overflow-wrap
1-89
Section 12.2: overflow-x and overflow-y
1-90
Section 12.3: overflow: scroll
1-91
Section 12.4: overflow: visible
1-92
Section 12.5: Block Formatting Context Created with Overflow
1-93
Chapter 13: Media Queries
1-94
Section 13.1: Terminology and Structure
1-95
Section 13.2: Basic Example
1-96
Section 13.3: mediatype
1-97
Section 13.4: Media Queries for Retina and Non Retina Screens
1-98
Section 13.5: Width vs Viewport
1-99
Section 13.6: Using Media Queries to Target Dierent Screen Sizes
1-100
Section 13.7: Use on link tag
1-101
Section 13.8: Media queries and IE8
1-102
Chapter 14: Floats
1-103
Section 14.1: Float an Image Within Text
1-104
Section 14.2: clear property
1-105
Section 14.3: Clearfix
1-106
Section 14.4: In-line DIV using float
1-107
Section 14.5: Use of overflow property to clear floats
1-108
Section 14.6: Simple Two Fixed-Width Column Layout
1-109
Section 14.7: Simple Three Fixed-Width Column Layout
1-110
Section 14.8: Two-Column Lazy/Greedy Layout
1-111
Chapter 15: Typography
1-112
Section 15.1: The Font Shorthand
1-113
Section 15.2: Quotes
1-114
Section 15.3: Font Size
1-115
Section 15.4: Text Direction
1-116
Section 15.5: Font Stacks
1-117
Section 15.6: Text Overflow
1-118
Section 15.7: Text Shadow
1-119
Section 15.8: Text Transform
1-120
Section 15.9: Letter Spacing
1-121
Section 15.10: Text Indent
1-122
Section 15.11: Text Decoration
1-123
Section 15.12: Word Spacing
1-124
Section 15.13: Font Variant
1-125
Chapter 16: Flexible Box Layout (Flexbox)
1-126
Section 16.1: Dynamic Vertical and Horizontal Centering (align-items, justify-content)
1-127
Section 16.2: Sticky Variable-Height Footer
1-128
Section 16.3: Optimally fit elements to their container
1-129
Section 16.4: Holy Grail Layout using Flexbox
1-130
Section 16.5: Perfectly aligned buttons inside cards with flexbox
1-131
Section 16.6: Same height on nested containers
1-132
Chapter 17: Cascading and Specificity
1-133
Section 17.1: Calculating Selector Specificity
1-134
Section 17.2: The !important declaration
1-135
Section 17.3: Cascading
1-136
Section 17.4: More complex specificity example
1-137
Chapter 18: Colors
1-138
Section 18.1: currentColor
1-139
Section 18.2: Color Keywords
1-140
Section 18.3: Hexadecimal Value
1-141
Section 18.4: rgb() Notation
1-142
Section 18.5: rgba() Notation
1-143
Section 18.6: hsl() Notation
1-144
Section 18.7: hsla() Notation
1-145
Chapter 19: Opacity
1-146
Section 19.1: Opacity Property
1-147
Section 19.2: IE Compatibility for `opacity`
1-148
Chapter 20: Length Units
1-149
Section 20.1: Creating scalable elements using rems and ems
1-150
Section 20.2: Font size with rem
1-151
Section 20.3: vmin and vmax
1-152
Section 20.4: vh and vw
1-153
Section 20.5: using percent %
1-154
Chapter 21: Pseudo-Elements
1-155
Section 21.1: Pseudo-Elements
1-156
Section 21.2: Pseudo-Elements in Lists
1-157
Chapter 22: Positioning
1-158
Section 22.1: Overlapping Elements with z-index
1-159
Section 22.2: Absolute Position
1-160
Section 22.3: Fixed position
1-161
Section 22.4: Relative Position
1-162
Section 22.5: Static positioning
1-163
Chapter 23: Layout Control
1-164
Section 23.1: The display property
1-165
Section 23.2: To get old table structure using div
1-166
Chapter 24: Grid
1-167
Section 24.1: Basic Example
1-168
Chapter 25: Tables
1-169
Section 25.1: table-layout
1-170
Section 25.2: empty-cells
1-171
Section 25.3: border-collapse
1-172
Section 25.4: border-spacing
1-173
Section 25.5: caption-side
1-174
Chapter 26: Transitions
1-175
Section 26.1: Transition shorthand
1-176
Section 26.2: cubic-bezier
1-177
Section 26.3: Transition (longhand)
1-178
Chapter 27: Animations
1-179
Section 27.1: Animations with keyframes
1-180
Section 27.2: Animations with the transition property
1-181
Section 27.3: Syntax Examples
1-182
Section 27.4: Increasing Animation Performance Using the `will-change` Attribute
1-183
Chapter 28: 2D Transforms
1-184
Section 28.1: Rotate
1-185
Section 28.2: Scale
1-186
Section 28.3: Skew
1-187
Section 28.4: Multiple transforms
1-188
Section 28.5: Translate
1-189
Section 28.6: Transform Origin
1-190
Chapter 29: 3D Transforms
1-191
Section 29.1: Compass pointer or needle shape using 3D transforms
1-192
Section 29.2: 3D text eect with shadow
1-193
Section 29.3: backface-visibility
1-194
Section 29.4: 3D cube
1-195
Chapter 30: Filter Property
1-196
Section 30.1: Blur
1-197
Section 30.2: Drop Shadow (use box-shadow instead if possible)
1-198
Section 30.3: Hue Rotate
1-199
Section 30.4: Multiple Filter Values
1-200
Section 30.5: Invert Color
1-201
Chapter 31: Cursor Styling
1-202
Section 31.1: Changing cursor type
1-203
Section 31.2: pointer-events
1-204
Section 31.3: caret-color
1-205
Chapter 32: box-shadow
1-206
Section 32.1: bottom-only drop shadow using a pseudo-element
1-207
Section 32.2: drop shadow
1-208
Section 32.3: inner drop shadow
1-209
Section 32.4: multiple shadows
1-210
Chapter 33: Shapes for Floats
1-211
Section 33.1: Shape Outside with Basic Shape – circle()
1-212
Section 33.2: Shape margin
1-213
Chapter 34: List Styles
1-214
Section 34.1: Bullet Position
1-215
Section 34.2: Removing Bullets / Numbers
1-216
Section 34.3: Type of Bullet or Numbering
1-217
Chapter 35: Counters
1-218
Section 35.1: Applying roman numerals styling to the counter output
1-219
Section 35.2: Number each item using CSS Counter
1-220
Section 35.3: Implementing multi-level numbering using CSS counters
1-221
Chapter 36: Functions
1-222
Section 36.1: calc() function
1-223
Section 36.2: attr() function
1-224
Section 36.3: var() function
1-225
Section 36.4: radial-gradient() function
1-226
Section 36.5: linear-gradient() function
1-227
Chapter 37: Custom Properties (Variables)
1-228
Section 37.1: Variable Color
1-229
Section 37.2: Variable Dimensions
1-230
Section 37.3: Variable Cascading
1-231
Section 37.4: Valid/Invalids
1-232
Section 37.5: With media queries
1-233
Chapter 38: Single Element Shapes
1-234
Section 38.1: Trapezoid
1-235
Section 38.2: Triangles
1-236
Section 38.3: Circles and Ellipses
1-237
Section 38.4: Bursts
1-238
Section 38.5: Square
1-239
Section 38.6: Cube
1-240
Section 38.7: Pyramid
1-241
Chapter 39: Columns
1-242
Section 39.1: Simple Example (column-count)
1-243
Section 39.2: Column Width
1-244
Chapter 40: Multiple columns
1-245
Section 40.1: Create Multiple Columns
1-246
Section 40.2: Basic example
1-247
Chapter 41: Inline-Block Layout
1-248
Section 41.1: Justified navigation bar
1-249
Chapter 42: Inheritance
1-250
Section 42.1: Automatic inheritance
1-251
Section 42.2: Enforced inheritance
1-252
Chapter 43: CSS Image Sprites
1-253
Section 43.1: A Basic Implementation
1-254
Chapter 44: Clipping and Masking
1-255
Section 44.1: Clipping and Masking: Overview and Dierence
1-256
Section 44.2: Simple mask that fades an image from solid to transparent
1-257
Section 44.3: Clipping (Circle)
1-258
Section 44.4: Clipping (Polygon)
1-259
Section 44.5: Using masks to cut a hole in the middle of an image
1-260
Section 44.6: Using masks to create images with irregular shapes
1-261
Chapter 45: Fragmentation
1-262
Section 45.1: Media print page-break
1-263
Chapter 46: CSS Object Model (CSSOM)
1-264
Section 46.1: Adding a background-image rule via the CSSOM
1-265
Section 46.2: Introduction
1-266
Chapter 47: Feature Queries
1-267
Section 47.1: Basic @supports usage
1-268
Section 47.2: Chaining feature detections
1-269
Chapter 48: Stacking Context
1-270
Section 48.1: Stacking Context
1-271
Chapter 49: Block Formatting Contexts
1-272
Section 49.1: Using the overflow property with a value dierent to visible
1-273
Chapter 50: Vertical Centering
1-274
Section 50.1: Centering with display: table
1-275
Section 50.2: Centering with Flexbox
1-276
Section 50.3: Centering with Transform
1-277
Section 50.4: Centering Text with Line Height
1-278
Section 50.5: Centering with Position: absolute
1-279
Section 50.6: Centering with pseudo element
1-280
Chapter 51: Object Fit and Placement
1-281
Section 51.1: object-fit
1-282
Chapter 52: CSS design patterns
1-283
Section 52.1: BEM
1-284
Chapter 53: Browser Support & Prefixes
1-285
Section 53.1: Transitions
1-286
Section 53.2: Transform
1-287
Chapter 54: Normalizing Browser Styles
1-288
Section 54.1: normalize.css
1-289
Section 54.2: Approaches and Examples
1-290
Chapter 55: Internet Explorer Hacks
1-291
Section 55.1: Adding Inline Block support to IE6 and IE7
1-292
Section 55.2: High Contrast Mode in Internet Explorer 10 and greater
1-293
Section 55.3: Internet Explorer 6 & Internet Explorer 7 only
1-294
Section 55.4: Internet Explorer 8 only
1-295
Chapter 56: Performance
1-296
Section 56.1: Use transform and opacity to avoid trigger layout