スライド ドア効果を使用して可変幅のコンテンツ ボックスを表示しています。効果は問題なく動作しますが、問題は、効果を作成するために必要なパディング ライトがコンテンツ領域の一部を占有することです。
http://screencast.com/t/s9dTT1wU
グラフィックの左端から右端までコンテンツが必要です。古い IE をサポートする必要があるため、負のマージンを使用できません。テキストだけでなく、内部に完全な HTML コンテンツが必要なため、text-indent も使用できません。CSS は次のとおりです。
.Quote.Outer
{
float: left;
background-image: url(/harmony/Common/Web/UI/Resources/Images/ValidationCalloutRight.png);
background-position: right center;
background-repeat: no-repeat;
padding-right: 50px;
height: 81px;
}
.Quote.Inner
{
background-image: url(/harmony/Common/Web/UI/Resources/Images/ValidationCalloutLeft.png);
background-position: left center;
background-repeat: no-repeat;
height: 81px;
outline: solid 1px hotpink;
}
マークアップは次のとおりです。
<div class="Quote Outer">
<div class="Quote Inner">html content here</div>
</div>
スライドドアのこの欠点について誰も議論していないことに驚いた。これに対する合理的なクロスブラウザ ソリューションはありますか?