نمط التمرير خصائص السلوك
مثال
أضف تأثير تمرير سلس إلى الصفحة:
document.documentElement.style.scrollBehavior = "smooth";
التعريف والاستخدام
تحدد الخاصية scrollBehavior ما إذا كان سيتم تحريك موضع التمرير بسلاسة ، بدلاً من الانتقال السريع ، عندما ينقر المستخدم على ارتباط داخل مربع قابل للتمرير.
دعم المتصفح
Property | |||||
---|---|---|---|---|---|
scrollBehavior | 61.0 | 79.0 | 36.0 | 14.0 | 48.0 |
بناء الجملة
object.style.scrollBehavior = "auto|smooth|initial|inherit"
قيم الملكية
Value | Description |
---|---|
auto | Default. Allows a straight jump "scroll effect" between elements within the scrolling box. |
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 |
الصفحات ذات الصلة
مرجع CSS: خاصية التمرير السلوك
❮ نمط الكائن