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

⛺️第2期第6题:如何画扇形?三角形? #13

Open
LinDaiDai opened this issue Jun 3, 2020 · 0 comments
Open

⛺️第2期第6题:如何画扇形?三角形? #13

LinDaiDai opened this issue Jun 3, 2020 · 0 comments
Labels

Comments

@LinDaiDai
Copy link
Owner

如何画扇形?三角形?

/*扇形*/
.sector {
  width: 0;
  height: 0;
  border: 100px solid red;
  border-color: red transparent transparent transparent;
  border-radius: 50%;
}
/*或者*/
.sector {
  width: 100px;
  height: 100px;
  border: 100px solid transparent;
  border-top-color: red;
  box-sizing: border-box; /* 这步很重要 */
  border-radius: 50%;
}
/*三角形*/
.triangle {
  width: 0;
  height: 0;
  border: 100px solid red;
  border-color: red transparent transparent transparent;
}
/*或者*/
.triangle {
  width: 100px;
  height: 100px;
  border: 100px solid transparent;
  border-top-color: red;
  box-sizing: border-box;
}
@LinDaiDai LinDaiDai added DD每周七题 DD每周七题 CSS and removed DD每周七题 DD每周七题 labels Jun 3, 2020
@LinDaiDai LinDaiDai removed the DD每周七题 DD每周七题 label Jun 10, 2020
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

1 participant