mirror of
https://github.com/wassname/CanvasTextWrapper.git
synced 2026-06-27 18:21:38 +08:00
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<script src="CanvasTextWrapper.js"></script>
|
||||
<script >
|
||||
var ctx = document.createElement('canvas').getContext('2d');
|
||||
ctx.canvas.width = ctx.canvas.height = 200;
|
||||
CanvasTextWrapper(ctx.canvas, "hello world how long can this be????");
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.body.appendChild(ctx.canvas);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user