用canvas画一个等腰三角形

  上图是代码,注意,宽高只有在canvas标签内部设置宽高,绘制的路径显示才是正常的;效果如下:

  

原文地址:https://www.cnblogs.com/zhangnan35/p/8628681.html