24 lines
911 B
Markdown
24 lines
911 B
Markdown
|
---
|
||
|
title: Add a Negative Margin to an Element
|
||
|
localeTitle: أضف هامشًا سلبيًا إلى عنصر
|
||
|
---
|
||
|
## أضف هامشًا سلبيًا إلى عنصر
|
||
|
|
||
|
الهامش هو التباعد بين حد عنصر وعناصر أخرى على الصفحة.
|
||
|
|
||
|
• هناك تباعد من الأعلى ، اليمين ، الأسفل ، واليسار.
|
||
|
|
||
|
• الرقم في [وحدات css](https://www.tutorialspoint.com/css/css_measurement_units.htm)
|
||
|
|
||
|
على سبيل المثال ، لضبط هامش عنصر ما ليكون سلبيًا ، يمكنك استخدام:
|
||
|
|
||
|
`.example {
|
||
|
margin: -10px;
|
||
|
}
|
||
|
`
|
||
|
|
||
|
**لضبط حشو** استخدام **عنصر فردي** : الحشو: `-10` بكسل؛
|
||
|
|
||
|
[يمكنك معرفة المزيد حول الهوامش السلبية هنا](https://www.smashingmagazine.com/2009/07/the-definitive-guide-to-using-negative-margins/)
|
||
|
|
||
|
حظا طيبا وفقك الله!
|