مرفق خلفية CSS
مرفق خلفية CSS
تحدد الخاصية ما background-attachment
إذا كان يجب تمرير صورة الخلفية أو إصلاحها (لن يتم التمرير مع بقية الصفحة):
مثال
حدد أن صورة الخلفية يجب أن تكون ثابتة:
body
{
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
}
مثال
حدد أن صورة الخلفية يجب أن تنتقل مع بقية الصفحة:
body
{
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
background-attachment: scroll;
}