【发布时间】:2010-10-10 16:04:02
【问题描述】:
我目前正在使用以下 CSS 设置 <input type='button'/> 元素的样式:
background: transparent url(someimage);
color: transparent;
我希望按钮显示为图像,但我不希望 value 文本显示在其顶部。正如预期的那样,这适用于 Firefox。但是,在 Internet Explorer 6 和 Internet Explorer 7 上,我仍然可以看到文本。
我尝试了各种技巧来隐藏文本,但都没有成功。是否有使 Internet Explorer 正常运行的解决方案?
(我只能使用type=button,因为这是一个 Drupal 表单,它的表单 API 不支持图像类型。)
【问题讨论】:
-
我遇到了同样的问题并尝试了所有 11 个答案,发现这些黑客(
text-indent和padding-left)只能修复具有type="submit"的输入,所以我有从type="image"更改。总之谢谢
标签: css internet-explorer drupal input transparency