【发布时间】:2014-12-22 15:53:06
【问题描述】:
我有图片链接按钮。
在高对比度模式下,图像 (ok.gif) 不可见,所以我想要备用图片。
我的备用“图片”是 unicode 字符 unicode \270E。
这在高对比度模式下工作,但在正常模式下,unicode 超过图像。
我想让我的备用“图片”在真实图片后面,这样在正常(非高对比度)模式下不可见。
感谢您的帮助。
a.img-button-edit,
a.img-button-edit:visited,
a.img-button-edit:link {
width: 28px;
height: 20px;
display: block;
background: transparent url("../Images/buttons/ok.gif") no-repeat top left;
background-position: -56px 0px;
}
a.img-button-edit:before {
text-align: center;
font-size: 1.3em;
margin: 0 0 0 0;
padding: 0 .2em;
content: "\270E";
}
【问题讨论】:
-
错误... z-indext?请务必声明
position以使 z-index 正常工作。 -
那么,你的实际问题是......?
-
一个伪元素的内容被插入到父元素内部的栈中。 z-index 将不起作用。 stackoverflow.com/questions/7822078/…
-
您可能需要重新考虑解决此问题的方法,因为插入的内容仍会被屏幕阅读器大声朗读。 VoiceOver 将读取 unicode 字符的名称,并且您不能在伪元素上指定 aria-hidden。 filamentgroup.com/lab/bulletproof_icon_fonts.html
标签: css accessibility section508