خاصية CSS background-clip
مثال
حدد إلى أي مدى يجب أن تمتد الخلفية داخل عنصر:
div
{
border: 10px dotted black;
padding: 15px;
background:
lightblue;
background-clip:
padding-box;
}
التعريف والاستخدام
تحدد الخاصية إلى أي مدى يجب background-clip
أن تمتد الخلفية (اللون أو الصورة) داخل عنصر ما.
القيمة الافتراضية: | مربع الحدود |
---|---|
وارث: | رقم |
متحرك: | رقم. اقرأ عن animatable |
الإصدار: | CSS3 |
بناء جملة JavaScript: | object .style.backgroundClip = "content-box" |
دعم المتصفح
تحدد الأرقام الواردة في الجدول إصدار المتصفح الأول الذي يدعم الخاصية بالكامل.
Property | |||||
---|---|---|---|---|---|
background-clip | 4.0 | 9.0 | 4.0 | 3.0 | 10.5 |
بنية CSS
background-clip: border-box|padding-box|content-box|initial|inherit;
قيم الملكية
Value | Description | Play it |
---|---|---|
border-box | Default value. The background extends behind the border | |
padding-box | The background extends to the inside edge of the border | |
content-box | The background extends to the edge of the content box | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
الصفحات ذات الصلة
دروس CSS: خلفيات CSS
مرجع DOM HTML: خاصية backgroundClip