固定サイズの画像を撮りたい。私は、異なるサイズの写真を持っている場合は画像の固定サイズを取る
.icon4 {
display: inline-block;
width: 270px;
height: 270px;
text-align: center;
color: #fff;
font-size: 130px;
line-height: 130px;
/*padding: 33px 20px 30px;*/
max-width: 100%; }
.icon2:before {
display: inline-block; }
.icon2.fa-shekel {
background: #4884f2; }
.icon2.fa-compass {
background: #d24f4f; }
<div class="icon4">
<img src="http://st2.depositphotos.com/1058504/12481/i/450/depositphotos_124811492-Two-businesspeople-discussing-work-in.jpg" alt="" />
</div>
https://jsfiddle.net/be70nhyb/
最終結果はイメージが異なるサイズである:私はこのコードをテストしました。
どのように私は画像から固定サイズのみを取ることができますか?
あなたは文字通り、これを尋ね、それが閉じられました。 – Albzi
JSFFiddleの例を参照 –
https://jsfiddle.net/be70nhyb/1/ –