如何在图片上输入文字 [英] How to type text on image

查看:85
本文介绍了如何在图片上输入文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我解决上述问题的html代码.

Please help me with the html code of above question.

推荐答案

在图像上显示"文本的唯一方法是设置文本框带有背景图片,然后将其输入.
然后,您可以分别保存文本框及其图像的内容,并在每次需要时将它们拉在一起.

没有其他方法,因为HTML不是图形语言.
The only way to ''Show'' text on an image is to set a text box with a background image and them type into that.
You can then save the contents of the text box and it''s image separately and pull them together each time you need them.

There is no other way as HTML is not a graphics language.


正如某些人已经说过的那样,在HTML 4.0
中是不可能的
但是,如果您使用的是HTML5,则可以将图像加载到画布中(使用drawImage()),然后在画布上绘制文本(使用fillText()).
As some folks already said, it is not possible in HTML 4.0

But, if you are using HTML5, you can load the image into a canvas (using drawImage()), then draw text on the canvas (using fillText()).


谈论将文本添加到图像文件中时,您不能:HTML没有诸如DrawString之类的任何图像处理功能.

如果不是,那么您要达到什么目的?
If you are talking about adding text to an image file, then you can''t: HTML does not have any image processing fucntions such as DrawString.

If you aren''t, then what are you trying to achieve?


这篇关于如何在图片上输入文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆