答案 0 :(得分:0)
是!
这是可能的,以及如何实现这一目标......
var canvas = new fabric.Canvas('c');
var text = new fabric.Text('DRAG PHOTO HERE', {
top: 100,
left: 100,
fontSize: 14,
fontFamily: 'Arial',
originX: 'center',
originY: 'center'
});
fabric.Image.fromURL('https://i.imgur.com/LKaEHRo.jpg', function(img) {
img.setWidth(200);
img.setHeight(200);
var group = new fabric.Group([img, text]);
canvas.setBackgroundImage(group);
canvas.renderAll();
});

canvas{border:1px solid #ccc}

<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.7.13/fabric.min.js"></script>
<canvas id="c" width="200" height="200"></canvas>
&#13;