【发布时间】:2012-10-09 14:34:44
【问题描述】:
这里是违规页面的链接:http://www.wrightspecialty.com/brokers-agents-questionnaire.html?view=foxcontact
我使用的表单生成器有一个限制。无法插入文本,除非它是文本框、输入等的标签。IE9、Firefox、Safari 和 Chrome 都正确显示。 IE7不支持,IE8有限制。
所以我尝试使用 :before 伪选择器插入副本。对于 IE8 及以下版本,我使用的是 Google 的 javascript。这适用于 IE7 而不是 IE8
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->
我将 css 中的每个元素作为目标:
.foxcontainer_brokers div:nth-child(11):before, .foxcontainer_brokers div:nth-child(14):before, .foxcontainer_brokers div:nth-child(17):before, .foxcontainer_brokers div:nth-child(20):before, .foxcontainer_brokers div:nth-child(23):before, .foxcontainer_brokers div:nth-child(23):before, .foxcontainer_brokers div:nth-child(26):before, .foxcontainer_brokers div:nth-child(29):before {
float: left;
margin-left: 0;
margin-bottom: 15px;
padding-left: 3px;
width: 100%;
font-weight: bold;
clear: both;
font-size: 12px;
}
.foxcontainer_brokers div:nth-child(11):before {
content: "Schools 8211 - Elementary and Secondary Schools";
}
etc...
有人有什么想法吗?提前致谢。
【问题讨论】:
标签: javascript css internet-explorer-8 pseudo-element