prisskreative
6/30/2014 - 7:35 PM

CSS Values and Units

CSS Values and Units

<!-- Color Values -->

<body>
<h1></h1>
<div>
hello
</div>
</body>

<style>

div{
	background-color:red; /* color keywords names */
}
div{
	background-color: #ff0033 ; /* color hexadecimal - combination of red (ff) green (00) blue (33) value - abbreviate if red(ff) is the same no (fd) */
}
div{
	background-color: rgb (65, 105, 255); /* rgb  mix red green blue - 255 max */
}
div{
	background-color: rgba (65, 105, 255, .9); /* rgb alpha (opacity of color semitransparent)  mix red green blue - 255 max */
}
div{
	background-color: hsl (248, 70%, 55%); /* hsl 3 values to determinate color 
	hue - color 
	saturation - take out color (desaturation 0%) 
	Lightness - light in color most light (100%)
	hsl color wheel */
}
div{
	background-color: hsla (248, 70%, 55%, .7); /* hsl with alpha */
}

</style>