Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

三栏布局移动优先设计 #239

Open
Sunny-117 opened this issue Nov 4, 2022 · 1 comment
Open

三栏布局移动优先设计 #239

Sunny-117 opened this issue Nov 4, 2022 · 1 comment

Comments

@Sunny-117
Copy link
Owner

No description provided.

@huccct
Copy link

huccct commented May 5, 2023

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .container {
        display: flex;
        flex-direction: column;
      }
      .sidebar {
        background-color: lightgray;
        padding: 10px;
      }

      .main-content {
        background-color: lightblue;
      }

      @media screen and (min-width: 768px) {
        .container {
          flex-direction: row;
        }
        .sidebar {
          flex-basis: 200px;
        }
        .main-content {
          flex-grow: 1;
          margin: 0 10px;
        }
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="sidebar">Sidebar</div>
      <div class="main-content">Main Content</div>
      <div class="sidebar">Sidebar</div>
    </div>
  </body>
</html>

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants