numpy某一范围值替换_一种新的图像替换技术:状态范围法

numpy某一范围值替换

Image replacement is arguably one of the most important CSS-based techniques available to a web designer. While some people view image replacement as merely a way to use fonts absent from the client computer, I believe that’s simply untrue. Image replacement has a place on nearly every web site – it can be useful in displaying a variety of page elements: company logos, attractive navigation bars, and fancy paragraph headings. Most importantly though, is its use for the “call to action” buttons; these must stand out in order to attract a visitor’s attention for performing important tasks (like signing up, downloading, or making a purchase).

图像替换可以说是Web设计人员可以使用的最重要的基于CSS的技术之一。 尽管有些人认为图像替换只是使用客户端计算机上缺少的字体的一种方式,但我认为这完全是不正确的。 图像替换几乎在每个网站上都有一席之地–可用于显示各种页面元素:公司徽标,引人注目的导航栏和精美的段落标题。 不过,最重要的是,它用于“号召性用语”按钮; 这些必须脱颖而出,以吸引访问者执行重要任务(例如注册,下载或购买)的注意力。

为什么图像替换如此重要 (Why Image Replacement is So Important)

If you already understand the fundamentals of image replacement, you can safely skip this section. Otherwise, let’s talk about it for a moment.

如果您已经了解图像替换的基本知识,则可以安全地跳过此部分。 否则,让我们谈论一下。

Styling text with CSS alone is basically limited to the selection of a few typefaces and flat-shaded coloring. Displaying effects like reflections, shadows, and perspective transformations to all users is a task that’s simply impossible given the level of support by web browsers in current use. The only reliable alternative for web designers is to display an image that contains these effects (created in a graphics program like Photoshop). And the most basic technique for displaying this image – a technique that was common even before CSS gained widespread use – is to embed that image in a page using an <img/> tag.

仅使用CSS样式的文本基本上仅限于一些字体和阴影的选择。 向所有用户显示诸如反射,阴影和透视变换之类的效果是一项任务,鉴于当前使用的Web浏览器的支持水平,这是根本不可能的。 Web设计人员唯一可靠的选择是显示包含这些效果的图像(在诸如Photoshop之类的图形程序中创建)。 显示此图像的最基本技术(一种在CSS得到广泛使用之前就很普遍的技术)是使用<img/>标记将该图像嵌入页面中。

However, using the img element to display what’s essentially textual information introduces a lot of complications. For one, when images are turned off, the page sometimes degrades insufficiently, especially in Internet Explorer. Secondly, because the actual text is separate to the markup, screen readers and search engines may be unable to read that text properly. Finally, depending on how the image was created, updating the text in the image can be inconvenient.

但是,使用img元素显示实质上的文本信息会带来很多麻烦。 首先,关闭图像后,​​页面有时无法充分降级,尤其是在Internet Explorer中。 其次,由于实际文本与标记分开,因此屏幕阅读器和搜索引擎可能无法正确阅读该文本。 最后,根据创建图像的方式,不方便更新图像中的文本。

One solution is to use image replacement, the practice of placing text inside an HTML element, then using CSS to replace that text with an upgraded version – the image. Unfortunately, because there are many different approaches (see Dave Shea’s excellent summary for a comprehensive list), each method to accomplish this can produce new complications of their own.

一种解决方案是使用图像替换 ,即将文本放置在HTML元素内,然后使用CSS将文本替换为升级版本(图像)的做法。 不幸的是,由于有许多不同的方法( 有关详细列表, 请参见Dave Shea的精彩摘要 ),每种实现此目的的方法都会产生新的复杂情况。

Web designers need an image replacement method that works without compromise – one that supports printing, degrades gracefully when images have been turned off in the client browser, imposes only necessary markup, and is simple enough to be used by anyone.

Web设计人员需要一种不影响折衷效果的图像替换方法-一种支持打印的方法,一种在客户端浏览器中关闭了图像时会优雅地降级的方法,仅施加必要的标记,并且必须足够简单以供任何人使用。

其他方法的问题 (The Problem with Other Methods)

Most other image replacement techniques (Fahrner, Phark, Gilder/Levin, Leahy/Langridge) use the same CSS when images are on and off. I’ve come to the conclusion that it’s important to make use of different CSS when images are on and off, otherwise the result suffers from one or more of the following side effects:

大多数其他图像替换技术(Fahrner,Phark,Gilder / Levin,Leahy / Langridge)在打开和关闭图像时都使用相同CSS。 我得出的结论是,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值