CSS特效(19)——鼠标悬浮内容自动撑开

鼠标悬浮内容自动撑开

<!DOCTYPE html>
<html lang="en">

<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>
    .bd {
      max-height: 0;
      overflow: hidden;
      transition: all 1s ease-out;
    }

    li:hover .bd {
      max-height: 600px;
      transition-timing-function: ease-in;
    }
  </style>
</head>

<body>
  <ul>
    <li>
      <div class="hd"> 列表1 </div>
      <div class="bd">列表内容
        <br>内容列表内容
        <br>内容列表内容
        <br>内容</div>
    </li>
    <li>
      <div class="hd"> 列表1 </div>
      <div class="bd">列表内容
        <br>内容列表内容
        <br>内容列表内容
        <br>内容</div>
    </li>
    <li>
      <div class="hd"> 列表1 </div>
      <div class="bd">列表内容
        <br>内容列表内容
        <br>内容列表内容
        <br>内容</div>
    </li>
  </ul>
</body>

</html>
posted @ 2018-09-07 15:40  Janas  阅读(464)  评论(0编辑  收藏  举报