javascript - How to crop images into rounded rectangles online through Html5 or original js?
ringa_lee2017-06-08 11:03:09
0
2
821
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
You need a canvas, and then use the line API and arcto API of canvas to complete this series of coquettish operations.
canvas drawing trajectory is circular