单个字母的图像替换? [英] Image replacement for a single letter?

查看:86
本文介绍了单个字母的图像替换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试做一个简单的(哈哈)图像替换,以便

''v''进入< h3>内的一串文字被替换为

刻度的图像,看起来像'v'以符合公司徽标(想象

Ferretweave与'v' ''用刻度而不是字母代替。)


我尝试了各种各样的东西,但还没有取得任何成功,主要是

因为所有的我看到的IR技术似乎依赖于

元素,其中包含块级文本,这不是

的情况。


我有这样的HTML ...


< h3>欢迎来到Ferretwea< span> v< / span> e< / h3>


我把''v''放在< span>中试图将背景

图像应用于它。我cna应用图像,但不隐藏字母。任何想法?


Haven没有显示的URL,因为我没有比这更多的东西

的HTML显示到目前为止;-(


TIA


-

Alan Silver

(任何东西)在这一行下面添加与我无关)

解决方案

Alan Silver写道:


我有像这样的HTML ...
< h3>欢迎来到Ferretwea< span> v< / span> e< / h3>

我把''v''放在< ; span>试图将背景图像应用到它。我cna应用图像,但不隐藏字母。任何想法?



在范围规则集中前景色与

背景相同。或者将前景色更改为透明。或者将

字体大小设置为0.


-

jmm(连字符)列表(at)sohnen-moe(点)com

(删除电子邮件的.AXSPAMGN)


在文章< G _ ****************************** @ giganews.com> ;, Jim Moe

< jm *************** @ sohnen-moe.com>撰写

Alan Silver写道:


我有这样的HTML ...
< h3>欢迎来到Ferretwea< span> v< / span> e< / h3>

我把''v''放在< span>中试图将背景图像应用于它。我cna应用图像,但不隐藏字母。任何想法?
在span规则集中使前景色与
背景相同。




然后你最终得到背景色的文字在背景图像上。

或者将前景色更改为透明。


文本显示为黑色(不知道为什么是黑色)至少有一个

浏览器

或设置
font-size为0.




麻烦的是,这会缩小< span>的宽度降到零,并且

因为它是一个内联元素,我不能设置它的宽度,所以图像

不会出现。


无论如何,谢谢。还有其他什么想法吗?


-

Alan Silver

(此行下面添加的任何东西都与我无关)


为了进一步培养人类,Alan Silver< alan-
SI **** @ nospam.thanx.inva 盖> vouchsafed:

你好,

我正在尝试做一个简单的(哈哈)图像替换,以便
''v ''在< h3>内的一串文字中取而代之的是一个看起来像''v'的图像,以符合公司徽标(想象
Ferretweave,其中''v''被刻度替换而不是这封信。

我尝试过各种各样的东西,但还没有取得任何成功,主要是因为我所看到的所有红外技术似乎都依赖于
元素包含文本是块级文本,这不是这里的案例。

我有这样的HTML ...

< h3>欢迎来到Ferretwea< span> v< / span> e< / h3>

我把''v''放在< span>中试图将背景图像应用于它。我cna应用图像,但不隐藏字母。有什么想法吗?

Haven没有显示的URL,因为到目前为止我没有比HTML更多的内容; - (




我没试过这个但是可能在原始范围内插入另一个跨度

并将新跨度设置为透明样式。


-

Neredbojias

Infinity有其限制。


Hello,

I am trying to do a simple (ha ha) bit of image replacement, so that the
''v'' in a string of text inside an <h3> is replaced with an image of a
tick that looks like a ''v'' to fit with a company logo (imagine
"Ferretweave" with the ''v'' replaced by a tick instead of the letter).

I have tried various things, but have not had any success yet, mainly
because all of the IR techniques I have seen seem to depend on the
element that contains the text being a block-level one, which isn''t the
case here.

I have HTML like this...

<h3>Welcome to Ferretwea<span>v</span>e</h3>

where I put the ''v'' in a <span> in an attempt to apply a background
image to it. I cna apply the image, but not hide the letter. Any ideas?

Haven''t got an URL to show as I don''t have anything more than this bit
of HTML to show so far ;-(

TIA

--
Alan Silver
(anything added below this line is nothing to do with me)

解决方案

Alan Silver wrote:


I have HTML like this...
<h3>Welcome to Ferretwea<span>v</span>e</h3>

where I put the ''v'' in a <span> in an attempt to apply a background
image to it. I cna apply the image, but not hide the letter. Any ideas?


In the span ruleset make the foreground color the same as the
background. Or change the foreground color to transparent. Or set the
font-size to 0.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


In article <G_******************************@giganews.com>, Jim Moe
<jm***************@sohnen-moe.com> writes

Alan Silver wrote:


I have HTML like this...
<h3>Welcome to Ferretwea<span>v</span>e</h3>

where I put the ''v'' in a <span> in an attempt to apply a background
image to it. I cna apply the image, but not hide the letter. Any ideas?
In the span ruleset make the foreground color the same as the
background.



Then you end up with background-coloured text over the background image.
Or change the foreground color to transparent.
The text was displayed in black (not sure why black) in at least one of
the browsers
Or set the
font-size to 0.



Trouble is that this shrinks the width of the <span> down to zero, and
as it''s an inline element, I can''t set a width on it, so the image
doesn''t appear.

Thanks anyway. Any other ideas?

--
Alan Silver
(anything added below this line is nothing to do with me)


To further the education of mankind, Alan Silver <alan-
si****@nospam.thanx.invalid> vouchsafed:

Hello,

I am trying to do a simple (ha ha) bit of image replacement, so that the
''v'' in a string of text inside an <h3> is replaced with an image of a
tick that looks like a ''v'' to fit with a company logo (imagine
"Ferretweave" with the ''v'' replaced by a tick instead of the letter).

I have tried various things, but have not had any success yet, mainly
because all of the IR techniques I have seen seem to depend on the
element that contains the text being a block-level one, which isn''t the
case here.

I have HTML like this...

<h3>Welcome to Ferretwea<span>v</span>e</h3>

where I put the ''v'' in a <span> in an attempt to apply a background
image to it. I cna apply the image, but not hide the letter. Any ideas?

Haven''t got an URL to show as I don''t have anything more than this bit
of HTML to show so far ;-(



I ain''t tried this but maybe insert another span inside the original span
and style the new span transparent.

--
Neredbojias
Infinity has its limits.


这篇关于单个字母的图像替换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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