gpt4 book ai didi

javascript - 是否可以在 html 文本字段中显示图像?

转载 作者:太空狗 更新时间:2023-10-29 15:26:21 27 4
gpt4 key购买 nike

我们可以在 html 的文本字段中显示图像吗?

编辑

我想做的是有一个可编辑区域,并想在其中添加html对象(即按钮、图像等)

最佳答案

文本字段中的图像:

你可以用 CSS 做到这一点。

看这个例子:

http://jsfiddle.net/oscarj24/zy7YP/1/

CSS:

.icon {
background:#FFFFFF url(http://icons.iconarchive.com/icons/gakuseisean/ivista-2/16/Start-Menu-Search-icon.png) no-repeat 4px 4px;
padding:4px 4px 4px 22px;
height:18px;
}​

HTML:

<input type="text" name="sample" class="icon">​

根据您的帖子编辑,这可能有所帮助。

内部有对象的可编辑区域:

http://jsfiddle.net/oscarj24/VSWNX/

关于javascript - 是否可以在 html 文本字段中显示图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10695544/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com