Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

让 Table 中的 div 占满整个单元格 #54

Open
varHarrie opened this issue Aug 23, 2023 · 1 comment
Open

让 Table 中的 div 占满整个单元格 #54

varHarrie opened this issue Aug 23, 2023 · 1 comment
Labels
Milestone

Comments

@varHarrie
Copy link
Owner

varHarrie commented Aug 23, 2023

<html lang="en">
<head>
  <style>
    table tr {
      height: 1px;
    }

    table tr td {
      height: inherit;
    }

    table tr td div {
      height: 100%;
      background: #ddd;
    }
  </style>
</head>
<body>
  <table>
    <tbody>
      <tr>
        <div>aaaaaaaaaaaaaaaaaaaaaaa</div>
      </tr>
      <tr>
        <div>bbbbbbbbbbbbbbbbbbbbbbb</div>
      </tr>
      <tr>
        <div>aaaaaaaaaaaaaaaaaaaaaaa</div>
      </tr>
      <tr>
        <div>aaaaaaaaaaaaaaaaaaaaaaa</div>
      </tr>
      <tr>
        <div>aaaaaaaaaaaaaaaaaaaaaaa</div>
      </tr>
      <tr>
        <div>aaaaaaaaaaaaaaaaaaaaaaa</div>
      </tr>
    </tbody>
  </table>
</body>
</html>
@varHarrie varHarrie added this to the Snippets milestone Aug 23, 2023
@Harish5232
Copy link

what is the issue over here tbh ?

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

No branches or pull requests

2 participants