CSS background properties မ်ားကို element တစ္ခု၏ background effects မ်ားအတြက္သံုးပါတယ္။ Background effects မ်ားအတြက္ CSS properties မ်ားမွာ
- background-color
- background-image
- background-repeat
- background-position
- background-attachment
background-color
background-color ကို Element ေတြရဲ့ background အေရာင္အတြက္ သံုးပါတယ္။Example:
<!DOCTYPE html><html>
<head>
<style>
body {background-color:#ffffff;}
h1{background-color:#888888;}
p{background-color:#eeffff;}
div{background-color:#b0c4dd;}
</style>
</head>
<body>
<h1>This is heading </h1>
<p> This is paragraph.</p>
<div>
This is a text inside a div element.
<p>This is paragraph between div tag </p>
This is also inside a div element.<br><br>
</div>
</body>
</html>
CSS မွာ color ကို HEX value, RGB value, color name တို.ျဖင့္ ေရးသားႏိုင္ပါတယ္။
HEX value syntax: #0000ff;
RGB value syntax: rgb(255,0,0)
Color name syntax: red
