<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
.element {
max-height: 0;
overflow: hidden;
transition: max-height .25s;
width: 200px;
}
:checked ~ .element {
max-height: 300px;
}
</style>
</head>
<body>
<input id="check" type="checkbox">
<p class="element">个人觉得,display:table-cell最强的应用是可以任意个数列表的等宽效果。 display:table-cell其他一些应用,例如,两栏自适应布局,垂直居中效果等等都是可以通</p>
<label for="check" class="check-in">更多↓</label>
</body>
</html>
s-高度不定内容展开
最新推荐文章于 2024-02-22 16:53:56 发布