###実現したいこと
画像の左上にcssで作成した円を配置して、さらにその円の上に数字を配置したい。
windows8.1 IE11のみ数字の位置がずれてしまうのですが、何か良い方法はないでしょうか。
よろしくお願いいたします。
###コード
html
1 <div class="hoge"> 2 <div class="imgBox"> 3 <div class="img">img</div> 4 <div class="num">1</div> 5 </div> 6 <div class="textBox"> 7 <p class="">テキストテキストテキストテキストテキストテキストテキストテキストテキスト</p> 8 </div> 9 </div>
css
1.hoge{ 2 width: 700px; 3 margin: 50px; 4} 5.imgBox{ 6 float: left; 7 width: 290px; 8 position: relative; 9} 10.img{ 11 height: 190px; 12 background-color: green; 13} 14.img:before{ 15 position: absolute; 16 content: ""; 17 color: #fff; 18 z-index: 2; 19 top: -20px; 20 left: 10px; 21 width: 40px; 22 height: 40px; 23 -webkit-border-radius: 50%; 24 -moz-border-radius: 50%; 25 border-radius: 50%; 26 background-color: red; 27} 28.num{ 29 position: absolute; 30 top: -12px; 31 left: 24px; 32 z-index: 3; 33 font-size: 24px; 34 color: #000; 35 font-family: "游明朝", YuMincho, "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN", "HG明朝E", "MS P明朝", "MS 明朝", serif; 36} 37.textBox{ 38 float: right; 39 width: 410px; 40 height: 190px; 41 background-color: blue; 42}
###試したこと
http://goo.gl/EIDFPM
上記より親要素と子要素にheight:100%を指定したが、改善されませんでした。
http://goo.gl/xQY24A
親要素にwidth:100%を指定しましたが、改善されませんでした。
http://nelog.jp/ie11-css-hack
上記方法でCSSでIE11のみに反映させる記述したところ、希望通りの位置になりましたが、windows7のIE11も影響を受けてしまい、改善にはいたりませんでした。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/06/03 08:53