15 Star 142 Fork 45

德育处主任 / Fabric.js学习资料(中文教程)

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
interactive.html 645 Bytes
Copy Edit Raw Blame History
德育处主任 authored 2022-08-23 17:12 . 修改画布交互模式
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>interactive</title>
</head>
<body>
<canvas id="canvasBox" width="400" height="400" style="border: 1px solid #ccc;"></canvas>
<script src="../../script/fabric.js"></script>
<script>
let canvas = new fabric.Canvas('canvasBox', {
interactive: false // 隐藏交互模式
})
let rect = new fabric.Rect({
top: 60,
left: 60,
width: 60,
height: 60,
fill: '#08d9d6'
})
canvas.add(rect)
</script>
</body>
</html>
JavaScript
1
https://gitee.com/k21vin/fabricjs-demo.git
git@gitee.com:k21vin/fabricjs-demo.git
k21vin
fabricjs-demo
Fabric.js学习资料(中文教程)
master

Search