0% found this document useful (0 votes)
15 views2 pages

W3 School

Uploaded by

yaduvanshid44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

W3 School

Uploaded by

yaduvanshid44
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

CSS Notes:

CSS colors:
Type 1 :->RGB and RGBA color (red,green,blue)
in RGB color all the values of color for red, green and blue value is min(0) and
max 255
And same as rgba (red ,green,blue and alpha) alpha is transparent for color like
its describe between 0.0 to 1.0
0.0 is fully transparent
1.0 not transparent

Type 2: css hex color : hexadecimal color


3 Digit HEX Value
Sometimes you will see a 3-digit hex code in the CSS source.
The 3-digit hex code is a shorthand for some 6-digit hex codes.
The 3-digit hex code has the following form:
#rgb
Where r, g, and b represent the red, green, and blue components with values between
0 and f.
The 3-digit hex code can only be used when both the values (RR, GG, and BB) are the
same for each component. So, if we have #ff00cc, it can be written like this: #f0c.

Type 3 :HSL and HSLA color:


H-->hue Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green,
and 240 is blue.
S-->saturation Saturation is a percentage value. 0% means a shade of gray, and
100% is the full color.
L-->lightness Lightness is also a percentage. 0% is black, 50% is neither light or
dark, 100% is white
-----------------------------------------------------------------------------------
--------------------------------
CSS background:
properties 1: background-color
Opacity / Transparency
The opacity property specifies the opacity/transparency of an element. It can take
a value from 0.0 - 1.0. The lower value, the more transparent:
-----------------------------------------------------------------------------------
--------------
CSS background-image:background-image:url("path of image with name")
we can able to set image for particular element

Css background-repeat:no-repeat/repeat-y/repeat-x
Css background-attachement:scroll/fixed

body{
/*backgrounf shorthand very useful in single like we can add multiple
bacground property*/
background: url("Beautiful-Scenery.jpg.crdownload") no-repeat fixed;
}
/* body{
background-image: url("Beautiful-Scenery.jpg.crdownload");
background-repeat: no-repeat;
background-position: top;
background-attachment: fixed;
}*/
-----------------------------------------------------------------------------------
--------------------------
CSS border:
p.six{
border: 2px solid red;
border-width: 5px 10px 13px 4px;// 5px from top,10px from right,13px
from bottom,4px from left
}
-----------------------------------------------------------------------------------
padding is use to provide the space betweent the contant and border.
margin is use to seprate the element between element.
-----------------------------------------------------------------------------------
-----

You might also like