CSS tilida orqa fonni sozlash
style teglarini ichidagi kodlar orqali biz veb saxifaning orqa fonlarini sozlashni ko'ramiz.
Demak body tegidan boshlaymiz.
body tegining background-color parametridan foydalanamiz, bunda biz background-color ni yozib ":"larni qo'yib unga qiymat beramiz, ya'ni rangni nomini yoki kodini kiritamiz.
Bizda blue qiymati berilgan. Ya'ni background-color parametriga blue qiymatini berib veb saxifaning orqa fonini ko'k rangga o'tkazdik.
body tegining background-color parametridan foydalanamiz, bunda biz background-color ni yozib ":"larni qo'yib unga qiymat beramiz, ya'ni rangni nomini yoki kodini kiritamiz.
Bizda blue qiymati berilgan. Ya'ni background-color parametriga blue qiymatini berib veb saxifaning orqa fonini ko'k rangga o'tkazdik.
CSS Kodlar :
<code>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: blue;
}
</style>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: blue;
}
</style>
</head>
<body>
<h1>Mening CSS veb saxifam! </h1>
<p>I Love Programming :) !</p>
<p>I Love Programming :) !</p>
</body>
</html>
</code>
</html>
</code>
Endi veb saxifaga rasm (orqa rasmni) qo'yishni ko'rib chiqamiz. Demak ko'rib turganingizdek background-image parametri orqali saytga rasm qo'yamiz. Men bu yerda sayt adresini kuritib qo'yibman, agar siz o'z rasimingizni chaqirib olishni istasangiz o'sha faylni manzilini kiritishingiz zarur bo'ladi.
CSS Kodlar:
<code>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("http://psrexternal.s3.amazonaws.com/Photoshop-blog/wp-content/uploads/2013/12/paper8p.jpg");
}
</style>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-image: url("http://psrexternal.s3.amazonaws.com/Photoshop-blog/wp-content/uploads/2013/12/paper8p.jpg");
}
</style>
</head>
<body>
<h1>Hello World! I have a background Image!</h1>
</body>
</html>
</code>
</html>
</code>
Keyingi kodlarda ko'rishguncha!!!
Comments
Post a Comment
Iltimos, fikrlaringizni yozib qoldiring !