HTML <iframe> Tag
ဥပမာ
inline frame တစ်ခုကို အောက်ပါအတိုင်း မှတ်သားထားသည်။
<iframe src="https://www.w3schools.com" title="W3Schools Free
Online Web Tutorials"></iframe>
အောက်တွင် နောက်ထပ် "စမ်းသုံးကြည့်ပါ" ဥပမာများ။
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
tag သည် <iframe>
inline frame ကိုသတ်မှတ်သည်။
လက်ရှိ HTML စာရွက်စာတမ်းအတွင်း အခြားစာရွက်စာတမ်းကို ထည့်သွင်းရန်အတွက် inline frame တစ်ခုကို အသုံးပြုသည်။
အကြံပြုချက်- ပုံစံပုံစံပြုလုပ်ရန် CSS ကိုသုံး <iframe>
ပါ (အောက်ပါဥပမာကိုကြည့်ပါ)။
အကြံပြုချက် - <iframe>
. ၎င်းကို စခရင်စာဖတ်သူများသည် မည်သည့်အကြောင်းအရာကို ဖတ်ရန် အသုံးပြု <iframe>
သည်။
Browser ပံ့ပိုးမှု
Element | |||||
---|---|---|---|---|---|
<iframe> | Yes | Yes | Yes | Yes | Yes |
ဂုဏ်တော်
Attribute | Value | Description |
---|---|---|
allow | Specifies a feature policy for the <iframe> | |
allowfullscreen | true false |
Set to true if the <iframe> can activate fullscreen mode by calling the requestFullscreen() method |
allowpaymentrequest | true false |
Set to true if a cross-origin <iframe> should be allowed to invoke the Payment Request API |
height | pixels | Specifies the height of an <iframe>. Default height is 150 pixels |
loading | eager lazy |
Specifies whether a browser should load an iframe immediately or to defer loading of iframes until some conditions are met |
name | text | Specifies the name of an <iframe> |
referrerpolicy | no-referrer no-referrer-when-downgrade origin origin-when-cross-origin same-origin strict-origin-when-cross-origin unsafe-url |
Specifies which referrer information to send when fetching the iframe |
sandbox | allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation |
Enables an extra set of restrictions for the content in an <iframe> |
src | URL | Specifies the address of the document to embed in the <iframe> |
srcdoc | HTML_code | Specifies the HTML content of the page to show in the <iframe> |
width | pixels | Specifies the width of an <iframe>. Default width is 300 pixels |
ကမ္ဘာလုံးဆိုင်ရာ အရည်အချင်းများ
<iframe>
tag သည် HTML တွင် Global Attributes ကို ပံ့ပိုး ပေးပါသည်။
ဖြစ်ရပ်ဂုဏ်တော်များ
<iframe>
tag သည် HTML ရှိ Event Attributes ကိုလည်း ပံ့ပိုး ပေးပါသည် ။
နောက်ထပ် ဥပမာများ
ဥပမာ
iframe ဘောင်များကို ပေါင်းထည့်ခြင်းနှင့် ဖယ်ရှားခြင်း (CSS ဖြင့်)
<iframe src="/default.asp" width="100%" height="300" style="border:1px solid
black;">
</iframe>
<iframe src="/default.asp" width="100%"
height="300" style="border:none;">
</iframe>
ဆက်စပ်စာမျက်နှာများ
HTML သင်ခန်းစာ- HTML Iframes
HTML DOM ရည်ညွှန်းချက်- IFrame အရာဝတ္ထု
မူရင်း CSS ဆက်တင်များ
ဘရောက်ဆာအများစုသည် <iframe>
အောက်ဖော်ပြပါ ပုံသေတန်ဖိုးများဖြင့် အစိတ်အပိုင်းကို ပြသလိမ့်မည်-
iframe:focus {
outline: none;
}
iframe[seamless] {
display: block;
}