W3.CSS

W3.CSS ပင်မစာမျက်နှာ W3.CSS နိဒါန်း W3.CSS အရောင်များ W3.CSS ကွန်တိန်နာများ W3.CSS Panels များ W3.CSS နယ်နိမိတ်များ W3.CSS ကတ်များ W3.CSS ပုံသေများ W3.CSS ဖောင့်များ W3.CSS Google W3.CSS စာသား W3.CSS Round W3.CSS Padding W3.CSS အနားသတ်များ W3.CSS ရုပ်ထွက် W3.CSS ခလုတ်များ W3.CSS မှတ်စုများ W3.CSS Quotes W3.CSS သတိပေးချက်များ W3.CSS ဇယားများ W3.CSS စာရင်းများ W3.CSS ပုံများ W3.CSS ထည့်သွင်းမှုများ W3.CSS တံဆိပ်များ W3.CSS Tag W3.CSS အိုင်ကွန်များ W3.CSS တုံ့ပြန်မှု W3.CSS Layout W3.CSS Animations W3.CSS Effects များ W3.CSS ဘားများ W3.CSS Dropdowns W3.CSS Accordions W3.CSS လမ်းညွှန် W3.CSS Sidebar W3.CSS Tabs များ W3.CSS Pagination W3.CSS တိုးတက်မှုဘားများ W3.CSS Slideshow W3.CSS Modal W3.CSS Tooltips W3.CSS ဇယားကွက် W3.CSS ကုဒ် W3.CSS စစ်ထုတ်မှုများ W3.CSS လမ်းကြောင်းများ W3.CSS Case W3.CSS ရုပ်ဝတ္ထု W3.CSS အတည်ပြုခြင်း W3.CSS ဗားရှင်းများ W3.CSS မိုဘိုင်း

W3.CSS အရောင်များ

W3.CSS အရောင်အတန်းများ W3.CSS Color Material ပါ။ W3.CSS Color Flat UI W3.CSS အရောင် Metro UI W3.CSS Color Win8 W3.CSS Color iOS ပါ။ W3.CSS အရောင်ဖက်ရှင် W3.CSS Color Libraries များ W3.CSS Color Schemes W3.CSS Color Themes W3.CSS Color Generator

ဝဘ်အဆောက်အဦ

ဝဘ်မိတ်ဆက် ဝဘ် HTML ဝဘ် CSS ဝဘ် JavaScript ဝဘ်လက်ကွက် Web Band Web Catering ဝဘ် စားသောက်ဆိုင် ဝဘ်ဗိသုကာ

ဥပမာများ

W3.CSS ဥပမာများ W3.CSS သရုပ်ပြများ W3.CSS Templates များ

ကိုးကား

W3.CSS အကိုးအကား W3.CSS ဒေါင်းလုဒ်များ

W3.CSS Modal


modal သည် လက်ရှိစာမျက်နှာ၏ထိပ်တွင်ပြသထားသည့် dialog box/popup window တစ်ခုဖြစ်သည်-

×

Modal Header

Hello World!

Go back to W3.CSS Modal to learn more!

Modal Footer Close


W3.CSS Modal အတန်းများ

W3.CSS သည် modal windows အတွက် အောက်ပါ အတန်းများကို ပံ့ပိုးပေးသည်-

အတန်း သတ်မှတ်ပါတယ်။
w3-modal modal ကွန်တိန်နာ
w3-modal-အကြောင်းအရာ modal အကြောင်းအရာ

Modal တစ်ခုဖန်တီးပါ။

w3-modal class သည် modal တစ်ခုအတွက် container တစ်ခုကို သတ်မှတ်သည်။

w3-modal-content class သည် modal အကြောင်းအရာကို သတ်မှတ်သည်။

Modal အကြောင်းအရာသည် မည်သည့် HTML ဒြပ်စင် (divs၊ ခေါင်းစီးများ၊ စာပိုဒ်များ၊ ရုပ်ပုံများ စသည်) ဖြစ်နိုင်သည်။

ဥပမာ

<!-- Trigger/Open the Modal -->
<button onclick="document.getElementById('id01').style.display='block'"
class="w3-button">Open Modal</button>

<!-- The Modal -->
<div id="id01" class="w3-modal">
  <div class="w3-modal-content">
    <div class="w3-container">
      <span onclick="document.getElementById('id01').style.display='none'"
      class="w3-button w3-display-topright">&times;</span>
      <p>Some text in the Modal..</p>
      <p>Some text in the Modal..</p>
    </div>
  </div>
</div>


Modal ကိုဖွင့်ပါ။

modal ကိုဖွင့်ရန် မည်သည့် HTML အစိတ်အပိုင်းကိုမဆို အသုံးပြုပါ။ သို့သော် ၎င်းသည် ခလုတ်တစ်ခု သို့မဟုတ် လင့်ခ်တစ်ခုဖြစ်သည်။

onclick attribute ကိုထည့် ကာ document.getElementById() method ကိုအသုံးပြု၍ modal ( id01 ) ၏ ID ကိုညွှန်ပြပါ။


Modal ကိုပိတ်ပါ။

modal ကိုပိတ်ရန်၊ modal ( id01 ) ကိုညွှန်ပြသည့် onclick attribute နှင့်အတူ element တစ်ခုသို့ w3-button class ကို ပေါင်းထည့်ပါ။ modal ၏ အပြင်ဘက်တွင် နှိပ်ခြင်းဖြင့် ၎င်းကို ပိတ်နိုင်သည် (အောက်ပါ ဥပမာကို ကြည့်ပါ)။

အကြံပြုချက်- × အက္ခရာ "x" ထက် အနီးကပ် အိုင်ကွန်များအတွက် ဦးစားပေး HTML အကြောင်းအရာဖြစ်သည်။


Modal Header နှင့် Footer

modal အကြောင်းအရာအတွင်း မတူညီသော ကဏ္ဍများကို ဖန်တီးရန် w3-container အတန်းများကို သုံး ပါ-

×

Modal Header

Some text..

Some text..

Modal Footer

ဥပမာ

<div id="id01" class="w3-modal">
  <div class="w3-modal-content">

    <header class="w3-container w3-teal">
      <span onclick="document.getElementById('id01').style.display='none'"
      class="w3-button w3-display-topright">&times;</span>
      <h2>Modal Header</h2>
    </header>

    <div class="w3-container">
      <p>Some text..</p>
      <p>Some text..</p>
    </div>

    <footer class="w3-container w3-teal">
      <p>Modal Footer</p>
    </footer>

  </div>
</div>

ကတ်တစ်ခုအနေဖြင့် Modal

ကတ်တစ်ခုအနေဖြင့် modal ကိုပြသရန် w3-card-* အတန်း များထဲမှ တစ်ခုကို w3-modal-content container သို့ ထည့်ပါ-

×

Modal Header

Some text..

Some text..

Modal Footer

ဥပမာ

<div class="w3-modal-content w3-card-4">

ကာတွန်းပုံစံများ

သတ်မှတ်ထားသော ဦးတည်ချက်မှ modal သို့ လျှော ကျရန် w3-animate-zoom|အပေါ်|အောက်ခြေ|ညာ|လက်ဝဲ အတန်းများကို အသုံးပြုပါ။

×

Modal Header

Some text..

Some text..

Modal Footer

×

Modal Header

Some text..

Some text..

Modal Footer

×

Modal Header

Some text..

Some text..

Modal Footer

×

Modal Header

Some text..

Some text..

Modal Footer

×

Modal Header

Some text..

Some text..

Modal Footer

×

Modal Header

Some text..

Some text..

Modal Footer

×

Modal Header

Some text..

Some text..

Modal Footer

ဥပမာ

<div class="w3-modal-content w3-animate-zoom">
<div class="w3-modal-content w3-animate-top">
<div class="w3-modal-content w3-animate-bottom">
<div class="w3-modal-content w3-animate-left">
<div class="w3-modal-content w3-animate-right">
<div class="w3-modal-content w3-animate-opacity">

w3-modal ဒြပ်စင်ပေါ်တွင် w3-animate-opacity class ကို သတ်မှတ်ခြင်းဖြင့် modal ၏ နောက်ခံအရောင်တွင် မှိန်သွားနိုင်သည် ။

ဥပမာ

<div class="w3-modal w3-animate-opacity">

Modal ပုံ

အရွယ်အစား အပြည့်အစုံဖြင့် ၎င်းကို modal အဖြစ်ပြသရန် ပုံကို နှိပ်ပါ။

နော်ဝေး
×
Norway

ဥပမာ

<img src="img_snowtops.jpg" onclick="document.getElementById('modal01').style.display='block'" class="w3-hover-opacity">

<div id="modal01" class="w3-modal w3-animate-zoom" onclick="this.style.display='none'">
  <img class="w3-modal-content" src="img_snowtops.jpg">
</div>

Modal ရုပ်ပုံပြခန်း

အရွယ်အစား အပြည့်ဖြင့် ပြသရန် ပုံပေါ်တွင် ကလစ်နှိပ်ပါ။

×

ဥပမာ

<div class="w3-row-padding">
  <div class="w3-container w3-third">
    <img src="img_snowtops.jpg" style="width:100%" onclick="onClick(this)">
  </div>
  <div class="w3-container w3-third">
    <img src="img_lights.jpg" style="width:100%" onclick="onClick(this)">
  </div>
  <div class="w3-container w3-third">
    <img src="img_mountains.jpg" style="width:100%" onclick="onClick(this)">
  </div>
</div>

<div id="modal01" class="w3-modal" onclick="this.style.display='none'">
  <img class="w3-modal-content" id="img01" style="width:100%">
</div>

<script>
function onClick(element) {
  document.getElementById("img01").src = element.src;
  document.getElementById("modal01").style.display = "block";
}
</script>

Modal Login Form

ဤဥပမာသည် လော့ဂ်အင်အတွက် ပုံစံတစ်ခုကို ဖန်တီးသည်-


× Avatar
Remember me
Forgot password?

ဥပမာ


တဘ်ပါရှိသော အကြောင်းအရာပါသော Modal

ဤဥပမာသည် တက်ဘ်လုပ်ထားသော အကြောင်းအရာပါသည့် ပုံစံတစ်ခုကို ဖန်တီးသည်-

×

Header

London

London is the most populous city in the United Kingdom, with a metropolitan area of over 9 million inhabitants.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

ဥပမာ


Close the Modal

In the examples above, we use a button to close the modal. However, with a little bit of JavaScript, you can also close the modal when clicking outside of the modal box:

Example

// Get the modal
var modal = document.getElementById('id01');

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
  if (event.target == modal) {
    modal.style.display = "none";
  }
}

Advanced: Lightbox (Modal Image Gallery)

This example shows how to add an image slideshow inside a modal, to create a "lightbox":

×

Nature and sunrise

Nature and sunrise
French Alps
Mountains and fjords

Example

Click on an image:

Tip: To learn more about slideshows, visit our W3.CSS Slideshow chapter.