画像を歪ませず丸く表示するCSS
を書いています。
google chrome
では問題無く綺麗に表示されるのですが、Internet Explore
では歪んでしまいます。同じCSS
ファイル内でブラウザによって切り替える様にしたいのですが、うまく動かず間違いご指摘頂けますと幸甚です。
- chrome
- IE(ちょっと分かり難いかもですが、歪んでいます)
元データ : web site
css
1##SCSSを利用しています 2icon-top{ 3 width: 1.5rem; 4 height: 1.5rem; 5 border-radius: 50%; 6 -moz-border-radius: 50%; 7 -webkit-border-radius: 50%; 8 object-fit: cover; /* ADD */ 9 } 10 @media all and (-ms-high-contrast:none){ 11 .icon-top { 12 width: 1.5rem; 13 height: 1.5rem; 14 border-radius: 50%; 15 overflow: hidden; 16 position: relative; 17 } 18 .icon-top img { 19 min-width: 100%; 20 min-height: 100%; 21 position: absolute; 22 left: 50%; 23 top: 50%; 24 -webkit-transform: translate(-50%, -50%); 25 -ms-transform: translate(-50%, -50%); 26 transform: translate(-50%, -50%); 27 } 28}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/06/27 02:07
2017/06/27 02:19
2017/06/28 00:18