1. The triangle

  • Set width and height to 0
  • Width, border-style, border-color
  • If a triangle is to be transparent, set border-color to transparent

Other:

  • A right triangle can be formed with two sides
  • A rectangle can have width not 0

Code – triangle

2. The fan

  • Draw a circle
  • Draw two more semicircles, absolute positioning (using border-radius)
  • Through the transform: rotate reg (90); Rotation Angle (transform-origin rotation base point)

Code – fan

parallelogram

  • Draw a rectangle
  • Skew 2D skew of Transform is used

Code – parallelogram

4. Reference

Use CSS to draw an arbitrary Angle of the sector, you can write a variety of implementation methods