1

問題のあるページへのリンクは次のとおりです。http://www.wrightspecialty.com/brokers-agents-questionnaire.html?view = foxcontact

私が使用しているフォームビルダーには制限があります。テキストボックスや入力などのラベルでない限り、テキストを挿入できません。IE9、Firefox、Safari、Chromeはすべて正しく表示されます。IE7にはサポートがなく、IE8には制限があります。

だから私は:before疑似セレクターを使ってコピーを挿入しようとしています。IE8以下では、GoogleのJavaScriptを使用しています。これはIE8ではなくIE7で機能します

    <!--[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...

誰か考えがありますか?前もって感謝します。

4

2 に答える 2

3

問題は:before、IE8がサポートしている疑似要素にはありません。それはあなたの:nth-child()疑似クラス...と::before二重コロンを持つあなたの疑似要素であり、どちらもIE8はサポートしていません。

IE9スクリプトが何らかの理由で機能しない場合は、Selectivizr +選択したセレクターライブラリ(jQueryなど)のようなものを試してみてください。IE8をサポートしようとしている場合は、その構文を理解していないため、疑似要素の二重コロンも避ける必要があります。

于 2012-10-09T14:37:33.280 に答える
1

IE8はcss3セレクターをサポートしていません(n番目の子)

于 2012-10-09T14:37:56.450 に答える