freeCodeCamp/guide/russian/certifications/responsive-web-design/basic-css/add-a-negative-margin-to-an.../index.md

25 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Add a Negative Margin to an Element
localeTitle: Добавить отрицательную маржу к элементу
---
## Добавить отрицательную маржу к элементу
Маржа - это расстояние между границей элемента и другими элементами на странице.
• Расстояние сверху, справа, снизу и слева.
• Число в [единицах css](https://www.tutorialspoint.com/css/css_measurement_units.htm)
Например, чтобы отрегулировать маржу элемента, который будет отрицательным, вы можете использовать:
```css
.example {
margin: -10px;
}
```
**Чтобы настроить прокладку отдельного элемента,** используйте: padding: `-10` px;
[Вы можете узнать больше об отрицательных маржах здесь](https://www.smashingmagazine.com/2009/07/the-definitive-guide-to-using-negative-margins/)
Удачи!