0
このコードがIEで動作しない理由は何ですか?私は複数のバージョンをテストしましたが、フォーカス要素が動作するはずですが、何らかの理由でクリックしても何も起こらないことがわかります。拡張コンテンツがIEで動作しない
.collapse {
\t text-align:left;
}
.collapse > * + *{
display:none;
}
.collapse > *{
cursor:pointer;
}
.collapse:focus{
outline:none;
}
.collapse:focus > * + *{
display:block;
}
.accordian-gradient {
\t
\t /*GRADIENT*/
\t background: rgba(168,168,168,1);
/* Old Browsers */background: -moz-linear-gradient(top, rgba(168,168,168,1) 0%, rgba(203,203,203,1) 52%, rgba(234,234,234,1) 100%);
/* FF3.6+ */background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(168,168,168,1)), color-stop(52%, rgba(203,203,203,1)), color-stop(100%, rgba(234,234,234,1)));
/* Chrome, Safari4+ */background: -webkit-linear-gradient(top, rgba(168,168,168,1) 0%, rgba(203,203,203,1) 52%, rgba(234,234,234,1) 100%);
/* Chrome10+,Safari5.1+ */background: -o-linear-gradient(top, rgba(168,168,168,1) 0%, rgba(203,203,203,1) 52%, rgba(234,234,234,1) 100%);
/* Opera 11.10+ */background: -ms-linear-gradient(top, rgba(168,168,168,1) 0%, rgba(203,203,203,1) 52%, rgba(234,234,234,1) 100%);
/* IE 10+ */background: linear-gradient(to bottom, rgba(168,168,168,1) 0%, rgba(203,203,203,1) 52%, rgba(234,234,234,1) 100%);
/* W3C */filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a8a8a8', endColorstr='#eaeaea', GradientType=0);
/* IE6-9 */
\t
\t
}
<div style="width:100%; max-width:750px; text-align:left;" class="collapse" tabindex="4">
<div style="width:100%; max-width:750px; text-indent:10px; margin-bottom:10px; padding:5px 0px 5px 0px;" class="accordian-gradient">Question<div style="width:20%; float:right; vertical-align:middle; text-align:right; padding-right:5px;">+ </div> </div>
<div style="width:100%; max-width:700px; cursor:default; padding-bottom:10px; margin: 0 auto;">
<p>Answer goes here</p>
</div>
</div>
私が追加できるものはありますか?私は非常に内部的なスタイルシートであり、javascriptやjqueryではなく信頼性の高いものとして使うことができます。できるだけ多くのCSSインラインを保つ必要があります。
おかげ
私は拡大/崩壊コンテンツを作るために
私はちょうど私の答えを更新しました。それがうまくいくことを望みます。 – Mechetle
私はIEでこれをテストしました。これはうまくいきます:D doctypeは必要ありません。 – Mechetle