Home >Web Front-end >CSS Tutorial >How to create a pure css slider
You can use the max-height property to create a pure CSS slider.
(Recommended tutorial: css quick start)
Attribute introduction:
max-height attribute sets the maximum height of the element. The max-height attribute does not include padding, borders, or margins!
Code implementation:
.slider { max-height: 200px; overflow-y: hidden; width: 300px; } .slider:hover { max-height: 600px; overflow-y: scroll; }
The above is the detailed content of How to create a pure css slider. For more information, please follow other related articles on the PHP Chinese website!