CHP4_CSS
CHP4_CSS
Objective
1. CSS Introduction
2. Basic CSS Syntax
3. CSS Color
4. CSS Background
5. CSS Margin & Padding
6. CSS Animation & Transition
7. CSS Grid
8. Styling CSS in HTML, Class and ID
CSS Introduction
CSS (Cascading Style Sheets) is a style sheet language used for describing the presentation of a document
written in a markup language such as HTML or XML.
5. HSLA (Hue-saturation-lightness-alpha)
Example: <h2 style="background-color:hsla(120,100%,50%,0.3);">hsla(120,100%,50%,0.3);</
h2>
4. CSS Background
5. CSS Margin & Padding
Margin-Padding Exercise
1px
10px
30px 5px
6. CSS Animation & Transition
CSS Animation & Transition
Exercise
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
Exercise :
From 1 – 20 , Transition when hover the cell box, the number should be larger than before
From 21 – 40, the number should be automate change the color from Black -> Red -> Blue every 1 second and loop
From 41 – 60, the number should be automate change the font size from small-> big every 1 second and loop
7. CSS Grid
8. Styling CSS in HTML, Class
and ID
By default of Web browser.
CSS styling in HTML element has 3 main concepts:
1. CSS styling HTML for overall element of the html structure which share the same property
(Color, Font Style, Background).
2. CSS styling on class, For apart or group by group of the html structure which share the same
properties.