HTML部分使用html2canvas函数无法在画布中正确渲染?

时间:2017-01-06 09:24:35

标签: php jquery html5 canvas html2canvas

首先我通过下面的代码将方形图像转换为圆形。

HTML
<div id="output_image" style="float:right; margin-bottom:6px; margin-right:6px;"><img id="imgdis" class="type3" src="components/com_jumi/files/imagesupload/Chrysanthemum.jpg"></div>

CSS
.type3 {
    width: 187px;
    height: 187px;
    margin-top: 40px;
    margin-right: 46px;
    position: relative;
    border-radius: 93px;
    overflow: hidden;
}

图像尺寸格式更改成功。但是,当我在画布上渲染这些部分时,它不会渲染,它的显示方形图像,但我想显示圆形图像。 见下面的例子。

Orange image is uploaded image. Image format is Circle

After execute html2canvas function its display in square instead of circle.

0 个答案:

没有答案