postion:relative;とpostion:absolute;を使い、2つの<div>を重ねたいです。
css
1 <div id="fade" style="postion: relative; top:0px; left:0px; width:100%; height:100%; opacity:0.5; background-color:#000000;"></div> 2<div id="box" style="positon: absolute; text-aling: center; margin-left:auto; margin-right:auto; top:10px; height:75%; width: 40%; border: 3px solid gray; border-radius: 35px;"></div>
id="fade"の上にid="box"を重ねたいです。
しかし、fadeの下にboxが表示され、全く重なっていません。
どこを改善したら良いでしょうか?
よろしくお願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2016/07/10 13:57