html5 canvas显示文字(写上5个字,纪念我那刚刚逝去的爱情)


<script type="text/javascript">
window.addEventListener('load',eventWindowLoaded,false);
function eventWindowLoaded(){
	canvasApp();
}
function canvasSupport(){
	return Modernizr.canvas;
}
function canvasApp(){
	if(!canvasSupport()){
		return;
	}else{
		var theCanvas = document.getElementById('canvas')
		var context = theCanvas.getContext("2d")

	}
	context.font="50px serif";
	context.fillStyle="#ff0000";
	context.fillText("烧死异性恋",100,80);
	
}


</script>

 


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
粤ICP备14056181号  © 2014-2020 ITdaan.com