Daily Report
  • Day 1 - 22/8
  • Day 2 - 23/8
  • Day 3 - 24/8
  • Day 4 - 25/8
  • Day 5 - 26/8
  • Day 6 - 28/8
  • Day 7 - 29/8
  • Day 8 - 30/8
  • Day 9 - 4/9
  • Day 10 - 5/9
  • Day 11 - 6/9
  • Day 12 - 7/9
  • Day 13 - 8/9
  • Day 14 - 9/9
  • Day 15 - 11/9
  • Day 16 - 12/9
  • Day 17 - 14/9
  • Day 18 - 15/9
  • Day 19 - 18/9
  • Day 20 - 19/9
  • Day 21 - 20/9
  • Day 22 - 21/9
  • Day 23 - 22/9
  • Day 24 - 23/9
  • Day 25 - 25/9
  • Day 26 - 26/9
  • Day 27 - 27/9
  • Day 28 - 28/9
  • Day 29 - 29/9
  • Day 30 - 2/10
  • Day 31 - 3/10
  • Day 33 - 7/10
  • Day 32 - 4/10
  • Day 34 - 9/10
  • Day 35 - 10/10
  • Day 36 - 11/10
  • Day 37 - 16/10
  • Day 38 - 17/10
  • Day 39 - 18/10
  • Day 40 - 19/10
  • Day 41 - 20/10
  • Day 42 - 21/10
  • Day 43 - 23/10
  • Day 44 - 25/10
  • Day 45 - 26/10
  • Day 46 - 27/10
  • Day 47 - 30/10
  • Day 48 - 31/10
  • Day 49 - 1/11
  • Day 50 - 2/11
  • Day 51 - 3/11
  • Day 52 - 5/11
  • Day 53 - 6/11
  • Day 54 - 7/11
  • Day 55 - 8/11
  • Day 56 - 9/11
  • Day 57 - 10/11
  • Day 58 - 13/11
  • Day 59 - 14/11
  • Day 60 - 15/11
  • Day 61 - 16/11
  • Day 4/12
  • Day 6/12
  • Day 7/12
  • Day 8/12
  • Day 12/12
  • Day 13/12
  • Day 14/12
  • Day 15/12
  • Day 16/12
  • Day 18/12
  • Day 19/12
  • Day 20/12
  • Day 21/12
  • Day 25/12
  • Day 26/12
  • Day 27/12
  • Day 28/12
  • Day 29/12
  • Day 3/1
  • Day 4/1
  • Day 5/1
  • Day 8/1
  • Day 10/1
  • Day 11/1
  • Day 12/1
  • Day 13/1
  • Day 15/1
  • Day 16/1
  • Day 17/1
  • Day 18/1
  • Day 19/1
  • Day 23/1
  • Day 24/1
  • Day 27/1
  • Day 29/1
  • Day 30/1
  • Day 1/2
  • Day 2/2
  • Day 5/2
  • Day 6/2
  • Day 15/2
  • Day 16/2
  • Day 17/2
  • Day 19/2
  • Day 20/1
  • Day 21/2
  • Day 22/2
  • Day 23/2
  • Day 26/2
  • Day 27/2
  • Day 28/2
  • Day 29/2
  • Day 1/3
  • Day 4/3
  • Day 5/3
  • Day 6/3
  • Day 7/3
  • Day 8/3
  • Day 9/3
  • Day 11/3
Powered by GitBook
On this page

Day 10 - 5/9

Target: Complete CSS

Progress:

  1. Form

  • box-sizing: border-box; : size of box now includes all padding, border and content

  • box-sizing: content-box; : size of box only contains content size

  • outline: none; : remove the default blue outline when an input is clicked

  • input:focus {} : set the behavior of inputs when clicked

  • use background-image and background-position to insert an image to input

  1. counters: to count the time one element is used

  • always start with counter-reset: name;

  • counter-increment: name; : insert name of needed element

  • content: ""; : decide what gonna show up when the element is use

  • counter() : add value of name to content

  • counters() : add string to content

  1. Specificity

  • hierarchy: when 2 or more css rules point to the same element, the one with highest specificity value will take effect.

  • the order: Inline style; ID; Class, pseudo-classes, attribute selectors; Elements, Pseudo-elements

  • use !important to override Inline style

  1. Math

  • calc() : perform + - * / calculation, and use the result as value

  • max()

  • min()

  1. Border images: specify an image as border

  • border-image: border-iamge-source border-image-slice border-image-width border-image-outset border-image-repeat;

  1. background: : to add multiple background images

  2. Color:

  • currentcolor : hold the current value of the color of an element

  • inherit : inherit the value from its parent element

  1. Gradient

  • linear-gradient(direction, color1, color2, ...); : default direction is top to bottom; can change direction to angle

  • linear-gradient(direction, rgba1, rgba2); : to change the transparency

  • repeating-linear-gradient(color1, color2, color3, ...); : to repeat

  1. Shadow

  • text-shadow: x y blur color, x y blur color, ...; : shadow effect and multiple effect

  • text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; : border around text

  • box-shadow: x y blur color, x y blur color, ...; : 1 or multiple shadows

  • box-shadow: x y blur spread color; : change the size of shadow

  • box-shadow: inset; : make the shadow be inner shadow

  1. Text overflow

  • text-overflow: clip; : cut the overflow part

  • text-overflow: ellipsis; : change the overflow to three dots

  • :hover {overflow: visible;} : make the text visible when hovering

  1. Word wrap

  • word-wrap: break-word; : break the long word when exceed line limit

  1. Word-break

  • word-break: keep-all; : keep all the word when exceed line limit

  • word-break: break-all; : break all the word when exceed line limit

  1. Writing mode

  • writing-mode: horizontal-tb; / vertical-rl;

  1. 2D transform

  • transform: translate(x, y); : move an element from current position to target position

  • transform: rotate(angle); : rotate an element clockwise or counter-clockwise

  • transform: scale(a, b); : increase or decrease the size of an element multiple times

  • scaleX(n); scaleY(n); : scale width or height

  • skewX(angle); skewY(angle); : skew the element

  • skew(Xangle, Yangle);

  • matrix(scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY());

  1. 3D tranform

  • rotateX(angle)

  • rotateY(angle)

  • rotateZ(angle)

  1. Transition: make a smooth tranform

  • transition: property duration timing-function delay;

  • transition-timing-function : linear (same speed from start to end), ease (slow start, fast, slow end), ease-in (slow start), ease-out (slow end), ease-in-out (slow start, slow end)

  1. Animation: allow an element change from one style to another

  • @keyframe example {from {} to {}}

div {

animation-name: example;

animation-duration: 3s;

}

  • @keyframe example{

0% {}

25% {}

100% {}

}

div {

animation-name: example;

animation-duration: 3s;

}

  • animation-delay: ns; : n negative, the animation play but skip first n seconds

  • animation-iteration-count: n; : animation play n times before stop; or 'infinite' to play infinitely

  • animation-direction: reverse / alternate (forward then backward)/ alternate reverse (backward then forward);

  • animation-timing-function: ;

  • animation-fill-mode: none / forwards (element keep the style set by the last keyframe) / backwards (element get the style set by the first keyframe) / both

  • animation: name duration timing-function delay iteration-count direction;

  1. Object-fit

  • fill : image is resized to fit, can be stretched or squished

  • contain : keep aspect ratio but resized to fit

  • cover : keep aspect ratio, can be clipped to fit

  • none : not resized

19.Object-position

  • object-fit: cover;

  • object-position: x% y%;

  1. Mask image

<div class="mask">

<img src="img.jpg">

</div>

.mask{

mask-image: url(maskimg.png);

mask-repeat: no-repeat;

}

  1. Multiple columns

  • column-count: n; : number of columns used

  • column-span: : number of columns that the element spans accross

  • columns: column-width column-count

  1. Var() function: useful when a color code is used multiple times

  • global var

:root {

--name1: #1e90ff;

--name2: #fefefe;

}

  • var(--name) : call for the variable

  1. Media Queries

  • @media not|only all|print|screen|speech and|not|only (expression) {}

  • use min-width for expression to design for mobile first

  1. Grid view

PreviousDay 9 - 4/9NextDay 11 - 6/9

Last updated 1 year ago