2012-03-16 21 views
0

私は多少透明にしたい#info-boxという名前のdivを持っています。このdivの要素を透明にしないためには、相対位置を適用して、#info-box div内にあるかのように見えるようにする必要があります。これはChromeでうまく動作しますが、Internet Explorerではコンテンツが通常の流れに沿っています。私は間違って何をしていますか? http://jsfiddle.net/kcqtj/1/Internet Explorerでの相対的な配置

+0

フィーリングを本質的な要素とスタイルに調整することができます。 – steveax

+0

問題は、影響を受ける要素の前にあるコードによって発生する可能性があります。 – user1174762

答えて

1

このような(擬似コード)を作成したい場合があります。 non_transparent_childは実際のコンテナであり、透明度を置く代わりにtransparent_childを後でエミュレートします。彼らはすべて移動可能なものになるpositioned_containerに含まれています。

<wrapper> 
    <positioned_container>  //parent that contains the two 
     <transparent_child>  //this is your transparent stuff 
     <non_transparent_child> //this will contain normal stuff 
    </positioned_container> 
</wrapper> 

//relative so that the absolute children will be based from here 
positioned_container{ 
    position:relative; 
} 

//set to stretch with the parent 
transparent_child { 
    position:absolute; 
    top:0; 
    bottom:0; 
    left:0; 
    right:0; 
} 
関連する問題