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

使用div和css实现一个圆形,红色部分站60%,绿色40% #231

Open
Sunny-117 opened this issue Nov 4, 2022 · 2 comments
Open

Comments

@Sunny-117
Copy link
Owner

No description provided.

@ppjiucai
Copy link

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=\, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    body {
        display: grid;
        place-self: center;
        height: 100vh;
        width: 100vw;
    }
    .container {
      width: 200px;
      height: 200px;
      border-radius: 50%;
      background: red;
      overflow: hidden;
    }
    .progress {
      height: 50%;
      width: inherit;
      background: #0f0;
    }
  </style>
  <body>
    <div class="container">
      <div class="progress"></div>
    </div>
  </body>
</html>

@huccct
Copy link

huccct commented May 5, 2023

height: 40%

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

No branches or pull requests

3 participants