Myanmar Coder Guide

Course Outline from w3school.com

Saturday, April 24, 2021

CSS Background-repeat

ပုံမှန်အားဖြင့် Background-image property သည်ပုံတစ်ပုံကိုအလျားလိုက်ရောဒေါင်လိုက်ပါထပ်ခါတလဲလဲလုပ်သည်။ အချို့သောရုပ်ပုံများကိုအလျားလိုက် (သို့) ဒေါင်လိုက်သာထပ်ခါတလဲလဲလုပ်သင့်သည်၊ သို့မဟုတ်လျှင်ထူးဆန်းနေလိမ့်မည်။

Example

  1. body{
  2.     background-img: url("gradient_bg.gif");
  3. }
Try it Yourself »

အထက်ပါပုံသည်အလျားလိုက်သာထပ်ခါတလဲလဲပြုလုပ်ပါက (background-repeat : repeat- x;) နောက်ခံသည်ပိုမိုကောင်းမွန်သောပုံဖြစ်သည်။

Example

  1. body{
  2.     background-img: url("gradient_bg.gif");
  3.     background-repeat: repeat-x;
  4. }
Try it Yourself »

ပုံအားဒေါင်လိုက်ထပ်မံလုပ်ရန် background-repeat: repeat-y;

CSS background-repeat: no-repeat

နောက်ခံပုံကိုတစ်ကြိမ်သာပြရန် background-repeat: no-repeat

Example

  1. body{
  2.     background-img: url("img_tree.png");
  3.     background-repeat: on-repeat;
  4. }
Try it Yourself »

အပေါ်ကဥပမာမှာနောက်ခံပုံကိုစာသားနဲ့အတူတူထားတယ်။ ကျွန်ုပ်တို့သည်ပုံ၏အနေအထားကိုပြောင်းလဲလိုသဖြင့်၎င်းသည်စာသားကိုအနှောင့်အယှက်မဖြစ်စေပါ။

CSS background-position

Background-position property ကနောက်ခံပုံရဲ့အနေအထားကိုဖော်ပြဖို့သုံးတယ်။

Example

  1. body{
  2.     background-img: url("img_tree.png");
  3.     background-repeat: on-repeat;
  4.     background-position: right top;
  5. }
Try it Yourself »

No comments:

Post a Comment