Hot to create Css3 Color, Font, and Background


Css3 Color, Font, and Background

Css color, font, and bachground

Color:In css you can define the text color,background color, or the color of some html elements. There are thee ways of how to specify the color:
  1. write color name

  2. write HEX value

  3. Write RGB value

  • color name:
Of course,it is not every color that can be created by the computer, you specify color name just by writing the name of the color as the color value of property>e.g.
I have set up the text decoration to underline, border color to red,
i set the text
color to green and i set border radius

here is the html codes
<div class="container">I have set up the text decoration to underline,
border,i set the color to green and i set border radius</div>

And here is the css for the above html
.container{width:100%; height:100%;
text-decoration:underline;
border:5px solid aqua;
color:green;
background-color:lightskyblue;
border-color:red;
text-decoration-color:white;
border-radius:10px;
text-align:center;}

  • HEX=Hexadecimal color:
This means six :the is a mix of six digigits/letters.The primary colors is RED, GREEN, and BLUE.If you combine those three colors, you can create any color you want, RR-represent RED,GG-represent GREEN, and BB-represent BLUE. You start the color with '#' and then write those letters/digits e.g.
i am going to use the same e.g. but with HEX colors
.box{width:100%; height:100%;
text-decoration:underline;
border:5px solid aqua;
color:#008000;
background-color:#87CEFA;
border-color:#FF0000;
text-decoration-color:white;
border-radius:10px;
text-align:center;}
here is the HTML
<div class="box"> skyblue backgroung,
green underline text,
withred border.

</div>
here is the result:
skyblue backgroung,
green underline text,
withred border.
  • RGB colors:
You can create any color you like with RGB just like with HEX colors. The only difference is their marhup. RGB start with the attribute rgb(). you just write thee numbers separated with commas, between parenthesis e.g.
I am going to use the same e.g. as above e.gs. but with RGB colors
.container{width:100%; height:100%;
text-decoration:underline;
border:5px solid aqua;
color:RGB(0,128,0);
background-color:RGB(135,206,250);
border-color:RGB(255,0,0);
text-decoration-color:white;
border-radius:10px;
text-align:center;}

here is the HTML for the above CSS
<div class="box-container"> skyblue backgroung,
green underline text,
withred border.</div>

here is the result:
skyblue backgroung,
green underline text,
withred border.
The output is the same as color name, HEX, and RGB.
Thanks For You Reading The Post We are very happy for you to come to our site. Our Website Domain name http://hausanovelspdf.blogspot.com/.
Newer Posts Newer Posts Older Posts Older Posts

More posts

Comments

Post a Comment