search

Home  >  Q&A  >  body text

javascript - How to crop images into rounded rectangles online through Html5 or original js?

Is there any way in h5 or js to crop the image on the web page, and then cut it into rounded corners? At present, I have only seen rectangular cuts. I wonder if it is possible to achieve a transparent .png cut with rounded corners

ringa_leeringa_lee2828 days ago856

reply all(2)I'll reply

  • 黄舟

    黄舟2017-06-08 11:05:09

    You need a canvas, and then use the line API and arcto API of canvas to complete this series of coquettish operations.

    reply
    0
  • 高洛峰

    高洛峰2017-06-08 11:05:09

    canvas drawing trajectory is circular

    reply
    0
  • Cancelreply