<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #container {
            width: 200px;
            height: 200px;
        }
        .card{
            width: 100%;
            height:100%;
            margin: 0 auto;
            overflow: hidden;
        }
        .card_a{
            background-color: red;
        }
        .card_b{
            background-color: blue;
            display: none;
        }
    </style>
</head>
<body>
<div id="container">
    <div class="card card_a">A</div>
    <div class="card card_b">B</div>
</div>
<script src="main.js"></script>
</body>
</html>
View Code

相关文章:

  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-04
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2021-04-12
相关资源
相似解决方案