运行效果:
<!DOCTYPE html> <html> <head> </head> <body> <canvas id=width=height=>A drawing of someing!</canvas> <script type=> ); if(drawing.getContext) { context = drawing.getContext(); context.fillStyle = ; context.textAlign = ; context.textBaseline = ; context.font = ; context.fillText(, 290, 90); context.globalAlpha = 0.7; context.font = ; context.fillText(, 380, 90); context.globalAlpha = 0.6; context.font = ; context.fillText(, 205, 90); context.globalAlpha = 0.6; context.font = ; context.fillText(, 450, 90); context.globalAlpha = 0.5; context.font = ; context.fillText(, 140, 90); context.globalAlpha = 0.5; context.font = ; context.fillText(, 500, 90); context.globalAlpha = 0.4; context.font = ; context.fillText(, 95, 90); context.globalAlpha = 0.4; context.font = ; context.fillText(, 530, 90); context.globalAlpha = 0.3; context.font = ; context.fillText(, 65, 90); context.globalAlpha = 0.3; } </script> </body> </html>