테스트 사이트 - 개발 중인 베타 버전입니다

HTML5 Canvas Stroke Text

· 8년 전 · 2609 · 1

HTML5 Canvas Stroke Text

 

 


 

 

 

Example

var c = document.getElementById("myCanvas");

var ctx = c.getContext("2d");

ctx.font = "30px Arial";

ctx.strokeText("Hello World",10,50);

 

 

<!DOCTYPE html>

<html>

<body>

 

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;">

Your browser does not support the HTML5 canvas tag.</canvas>

 

<script>

var c = document.getElementById("myCanvas");

var ctx = c.getContext("2d");

ctx.font = "30px Arial";

ctx.strokeText("Hello World",10,50);

</script>

 

</body>

</html>

 

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

대한민국3대김수현
8년 전
오~ 고맙습니다!

게시글 목록

번호 제목
3056
3055
3054
3051
3050
3049
3046
3045
3044
3043
3042
3041
3040
3039
3038
3034
3033
3032
3027
3026
3025
3024
3023
3022
3021
3020
3019
3018
3017
3016