问题
I am trying to mimic the behavior of markers on white boards and was wondering if it I can do it with svg polylines. I know the stroke width can be set but can be it changed to vary depending on the velocity of the mouse which I can figure out or is it just a constant value for the stroke?
回答1:
You can't have multiple stroke widths in a single polyline element. I think canvas is probably a better fit for this task.
回答2:
Or if you wanted to use SVG, instead of using a <polyline>, use a series of connected <line>s
来源:https://stackoverflow.com/questions/18003323/decreasing-polyline-stroke-width