c# - 如何在不重复的文本框中制作图像

标签 c# asp.net css background-repeat

我正在将图像应用到文本框,如下所示

<asp:TextBox ID="TextBox1" runat="server" Style="background-image: url('Popup(Images)/Solved.png');"
        BorderStyle="None"  />

结果如下

enter image description here

我试过应用 no-repeat 但图像没有显示。谁能帮我。为什么我使用文本框是唯一一个在其属性设置为 disabled 时变灰的控件,或者如果有人知道如何通过显示图像使 image button 变灰我那个解决方案

最佳答案

input.textbox
{
   background-image: url('Popup(Images)/Solved.png');
   background-repeat:no-repeat;
}

<asp:TextBox ID="TextBox1" runat="server" CssClass="textbox" BorderStyle="None"  />

关于c# - 如何在不重复的文本框中制作图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9786054/

相关文章:

jquery - 当 TBody tr 为空时移除 TFoot

c# - Android转WP7绝对新手问题: C# or VB?

c# - Google Calendar API v3 - 在服务器上部署时请求超时

c# - 我可以用 ASP.NET 页面类中的私有(private)变量替换 HiddenField 吗?

javascript - ASP :TextBox not cooperating with javascript

javascript - 如果单击消息框,防止鼠标离开元素淡入淡出

javascript - 如何获得类似苹果网站的字体样式?

c# - 单步执行代码时未找到 ExecutionTimer.cs

c# - 更新面板 asp.net - 页面刷新

c# - 将数据集转换为 XML