CSS scroll-behavior Property
ဥပမာ
စာရွက်စာတမ်းသို့ ချောမွေ့စွာ လှိမ့်ဆွဲသည့်အကျိုးသက်ရောက်မှုကို ထည့်ပါ-
html {
scroll-behavior: smooth;
}
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
scroll-behavior
အသုံးပြုသူသည် လှိမ့်နိုင်သောအကွက်အတွင်း လင့်ခ်တစ်ခုကို နှိပ်သည့်အခါ ဖြောင့်တန်းစွာ ခုန်မည့်အစား၊ ရွေ့လျားနိုင်သော အနေအထားကို ချောမွေ့စွာ လှုပ်ရှားနိုင်စေခြင်း ရှိ၊မရှိ သတ်မှတ်ပေးသည် ။
မူလတန်ဖိုး: | အော်တို |
---|---|
အမွေဆက်ခံသည်- | မဟုတ်ဘူး |
သက်ဝင်လှုပ်ရှားနိုင်သော | မဟုတ်ဘူး ကာတွန်း အကြောင်းဖတ်ပါ။ |
ဗားရှင်း- | CSSOM View Module (လုပ်ငန်းဆောင်တာမူကြမ်း) |
JavaScript syntax- | အရာဝတ္ထု .style.scrollBehavior="ချောမွေ့" |
Browser ပံ့ပိုးမှု
ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။
Property | |||||
---|---|---|---|---|---|
scroll-behavior | 61.0 | 79.0 | 36.0 | 14.0 | 48.0 |
CSS Syntax
scroll-behavior: auto|smooth|initial|inherit;
အိမ်ခြံမြေတန်ဖိုးများ
Value | Description |
---|---|
auto | Allows a straight jump "scroll effect" between elements within the scrolling box. This is default |
smooth | Allows a smooth animated "scroll effect" between elements within the scrolling box. |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |