إزاحة مخطط CSS
إزاحة مخطط CSS
تضيف outline-offset
الخاصية مسافة بين مخطط تفصيلي وحافة / حد عنصر. المسافة بين العنصر ومخططه الخارجية شفافة.
يحدد المثال التالي مخططًا تفصيليًا 15 بكسل خارج حافة الحد:
تحتوي هذه الفقرة على مخطط تفصيلي 15 بكسل خارج حافة الحد.
مثال
p {
margin: 30px;
border: 1px solid black;
outline:
1px solid red;
outline-offset: 15px;
}
يوضح المثال التالي أن المسافة بين العنصر ومخططه الخارجية شفافة:
هذه الفقرة لها مخطط تفصيلي 15 بكسل خارج حافة الحد.
مثال
p {
margin: 30px;
background:
yellow;
border: 1px solid black;
outline:
1px solid red;
outline-offset: 15px;
}
جميع خصائص CSS Outline
Property | Description |
---|---|
outline | A shorthand property for setting outline-width, outline-style, and outline-color in one declaration |
outline-color | Sets the color of an outline |
outline-offset | Specifies the space between an outline and the edge or border of an element |
outline-style | Sets the style of an outline |
outline-width | Sets the width of an outline |