HTML5 Canvas Stroke Text > 퍼블리셔팁

퍼블리셔팁

퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.

HTML5 Canvas Stroke Text 정보

HTML HTML5 Canvas Stroke Text

본문

HTML5 Canvas Stroke Text

 

 

65defb0327642f480c2599904de52fad_1485069222_7811.PNG
 

 

 

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
  • 복사

댓글 1개

© SIRSOFT
현재 페이지 제일 처음으로