【问题标题】:Need to change the text in an image button需要更改图像按钮中的文本
【发布时间】:2011-11-12 16:13:27
【问题描述】:

我有一个图像按钮,正如我在此处附加的那样。我用于此图像按钮的相应代码是

 <asp:ImageButton  ID="imgbtn_GenerateRpt" runat="server" ImageUrl="~/images/report.gif" Enabled="false"  CssClass="imageButton" 
                    onclick="imgbtn_GenerateRpt_Click"/>

css类

.imageButton![enter image description here][1]
      {
         position:relative;
         top:5px;![enter image description here][2]

      }

此图像按钮中的文本是“生成报告”。我希望在此图像按钮中显示自定义文本“确认”,而不是“生成报告”文本。

如何在不使用任何图像编辑工具(如 Photoshop 或 coreldraw)的情况下实现这一目标?

有什么帮助吗?

【问题讨论】:

  • 我不完全确定我明白你在问什么。您所指的文本是图像、report.gif、文件的一部分吗?

标签: asp.net css image


【解决方案1】:

如果图片本身包含文字,那么真的没有办法创建全新的图片

根据图像的形状,您可能会覆盖一个 &lt;div&gt; 元素,其背景颜色设置为与图像相同,但此时您只是在浪费时间。

Download Paint.Net for free 并花大约 5 分钟时间创建一个新图像。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-20
    • 1970-01-01
    • 2012-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多