ပုံစံတွဲ လမ်းကြောင်း ကို ပြုလုပ်တာ
ပုံစံတွဲ လမ်းကြောင်း ကို ပြသလို့ သဘောပေါက်လို့ ပြုလုပ်ပါ
ပုံစံတွဲ လမ်းကြောင်း
ခုံးချိန် လမ်းကြောင်း ကို ပြသလို့ ကျွန်ုပ်တို့က ပြသပါ
ပိုင်းကွက်
အိမ်အိုင် အရိုးတစ်လျှောက်မှာ ရှိသည်..
သတင်း
ဒီနေ့ မနေ့မှာ သတင်းအချက်အလက်များ
ဆက်သွယ်
ခင်းမှာ ဆက်သွယ်လို့ သို့မဟုတ် ကွန်းစိမ်းတစ်ဖက်သို့ လှည့်ကျင်
သတင်း
ကျွန်ုပ်ကြည်းနှင့် ကျွန်ုပ်တို့ကျွန်ုပ်တို့ပြုလုပ်ကြည်း
ပုံစံတွဲ သတင်းစာ
ပထမပိုင်း - ဟေတိုင်းကျမ်းပြုလုပ်
၂၅၀၁၂ ပိုင်းကွက် ၂၅၀၁၂ သတင်းစာ <button class="tablink" onclick="openPage('Contact', this, 'blue')">Contact</button> <button class="tablink" onclick="openPage('About', this, 'orange')">About</button> <div id="Home" class="tabcontent"> <h3>Home</h3> <p>Home is where the heart is..</p> </div> <div id="News" class="tabcontent"> <h3>News</h3> <p>Some news this fine day!</p> </div> <div id="Contact" class="tabcontent"> <h3>Contact</h3> <p>Get in touch, or swing by for a cup of coffee.</p> </div> <div id="About" class="tabcontent"> <h3>About</h3> <p>Who we are and what we do.</p> </div>
အသုံးပြုသူ ဘေ့စ်နက် အသုံးပြုခြင်း ဖြင့် အသုံးပြုသူ ဘေ့စ်နက် နှင့် 'ကွဲပြား' သော လမ်းကြောင်း အော်ဝါဒ ဖွင့်လိမ့်မည်။ အသုံးပြုသူ ဘေ့စ်နက် အား ပါဝင်သော class="tabcontent"
ရှိ <div>
အဆိုပါ အရာဝတ္တု အား လုံးဝ ကွက်လွှားခြင်း (လက်တင် CSS နှင့် JS) ဖြင့် ဖတ်သမျှကို ကွက်လွှားထားပါတယ်။ အသုံးပြုသူ ဘေ့စ်နက် ကို လွှတ်သောအခါ ဘေ့စ်နက် နှင့် 'ကွဲပြား' သော လမ်းကြောင်း အော်ဝါဒ ဖွင့်လိမ့်မည်။
ဒုတိယပိုင်း - လက်တင် CSS:
လမ်းကြောင်း နှင့် လမ်းကြောင်း အော်ဝါဒ (ပုံစံ) နှင့် အခြေခံ အော်ဝါဒ ပြုလုပ်ရန်:
/* အခြေခံအုပ်စု နှင့် အခြေခံဆက်ကြောင်း အထိပ်သို့ 100% ကို အစိုးရ ရန် အထိပ်သို့ အထိပ် နှင့် အဆိုပါ လမ်းကြောင်း */ body, html { height: 100%; margin: 0; font-family: Arial; } /* ပုံစံ စာတိုက် လမ်းကြောင်း ပြုလုပ်ရန် */ .tablink { background-color: #555; color: white; float: left; border: none; outline: none; cursor: pointer; padding: 14px 16px; font-size: 17px; width: 25%; } .tablink:hover { background-color: #777; } /* ပေါ်လွှာပြိန်းဆုံးအခြေခံ အပြုအမူ ကို စတင်ပြီး ပုံစံကို ထပ်ပေးပါ (ပုံစံကို ပုံစံတစ်ခု ထပ်ပေးပါ) */ .tabcontent { color: white; display: none; padding: 100px 20px; height: 100%; } #Home {background-color: red;} #News {background-color: green;} #Contact {background-color: blue;} #About {background-color: orange;}
တတိယပိုင်း - ဂျာမိုကရေစီ ထပ်ပေးပါ
function openPage(pageName, elmnt, color) { // class="tabcontent" အရာများအား ပျက်စီးစေပါ var i, tabcontent, tablinks; tabcontent = document.getElementsByClassName("tabcontent"); for (i = 0; i < tabcontent.length; i++) { tabcontent[i].style.display = "none"; } // အချက်အလက်ပေါ်လွှာတွေ၏ ဘေ့စ်ဖုန်း/ဘေ့စ်ပေါင်းစုံကို အခြေခံအရောင်ကို ဖျက်သိမ်းပါ tablinks = document.getElementsByClassName("tablink"); for (i = 0; i < tablinks.length; i++) { tablinks[i].style.backgroundColor = ""; } // အချက်အလက်ပေါ်လွှာကို ပြပါ document.getElementById(pageName).style.display = "block"; // ပေါ်လွှာပြိန်းဆုံးကို ဖော်ထုတ်သော ဘေ့စ်ဖုန်းကို အထူးအရောင်တစ်ခု ထပ်ပေးပါ elmnt.style.backgroundColor = color; } // တွေ့ရှိသော id="defaultOpen" အကိရိယာကို စွပ်စွဲပြီး လုပ်ပေးပါ document.getElementById("defaultOpen").click();
相关页面
教程:如何创建标签页