---
layout: single
property_name: max-height
---
Defines the maximum height the element can be.
The element has no limit in terms of height.
You can use numeric values like pixels, (r)em, percentages... If the maximum height is larger than the element's actual height, the max height has no effect.
If the content does not fit within the maximum height, it will overflow. How the container will handle this overflowing content is defined by the
#max-height
默认属性
max-height: none;
max-height: 2000px;
max-height: 100px;
overflow property.