CSS

CSS

2022/06/21 (增加連結)

基本概念

table {

contain: strict;

}

Selector

div span

技巧

<link rel="stylesheet" href="/path/to/my.css" media="print" onload="this.media='all'">

Animations

Border

Button

Cache

Chart

Color

Box Model

  • CSS: Box-Model

    • The Box Model is made up of 4 core element

      • Content - The text, image, or other media content in the element.

      • Padding- The space between the box’s content and its border.

      • Borders - The line between the box’s padding and margin.

      • Margins - The space between the box and surrounding boxes.

  • The Basic Guide to the CSS Box Model

    • The Content Area

    • The Padding Area

    • The Border Area

    • The Margin Area

    • Determining the Size of a Box

      • By default, the width style in CSS is only applied to the content area, and applying a padding or borderstyle will appear to grow the element.

      • The box-sizing style

        • content-box (default)

        • border-box: use the padding and border sizes in its sizing calculations

Flexbox

Font

Grid

Houdini

Image

Layout

Link

Menu

Position

Responsive

Text

Theme

Time

Tooltips

Transitions

Variables

W3.CSS

Preprocesssors

LESS

SASS / SCSS

工具

Chrome DevTools

  • Introduction to Chrome DevTools for CSS

    • View CSS in both Style and Sources tabs.

    • Edit and filter in the Style and Computed tabs.

    • Simulate a mobile viewport.

    • View unused CSS under the Coverage tab.

    • View print page.