எளிய தமிழில் CSS – 6 – body background

Body background

நமது வலைத்தளப் பக்கங்களின் பின்புறத்தை ஏதேனும் ஒரு நிறத்தைக் கொண்டு நிரப்ப style code-ஐப் பின்வருமாறு அமைக்க வேண்டும்.

[code]

<html>

<head>

<style>

body {background-color: skyblue;}

</style>

</head>

<body> Dont Giveup! Keep on Trying! Even though it seems to be impossible, It will happen in your life one day. All the very best friends! Wait to see the miracle in your life!!!!!! </body>

</html>

[/code]

ஏதேனும் ஒரு நிறத்திற்குப் பதிலாகப் படத்தையும் கொடுக்கலாம். இது பின்வருமாறு.

body {background: url(“image.gif”);}

மேற்கண்ட முறையில் படமானது பக்கம் முழுவதும் திரும்பத் திரும்ப வந்து நிரப்புகிறது. அவ்வாறு இல்லாமல் ஒரே ஒரு முறை மட்டும் படம் வெளிப்படுமாறு செய்ய no repeat என்று கொடுக்க வேண்டும். இது பின்வருமாறு.

body {background: url(“image.gif”)no-repeat;}

no-repeat ஆனது படத்தை பொதுவாக இடப்பக்கத்தில் மட்டும் அமைக்கும். இதனை வலப்பக்கம் மாற்ற no-repeat right top என்று கொடுக்க வேண்டும். இது பின்வருமாறு.

body {background: url(“image.gif”)no-repeat right top;}

அடுத்து நீளவாட்டில் மட்டும் படம் வெளிப்படுமாறு செய்ய repeat-x எனவும், பக்கவாட்டில் மட்டும் படம் வெளிப்படுமாறு செய்ய repeat-y எனவும், கொடுக்க வேண்டும். இவை பின்வருமாறு.

body {background: url(“image.gif”)repeat-x;}

body {background: url(“image.gif”)repeat-y;}

 

 

 

து. நித்யா

nithyadurai87@gmail.com

தொடரின் பிற பகுதிகளைப் படிக்க – www.kaniyam.com/category/css-in-tamil/

%d bloggers like this: