我想拍攝固定尺寸的圖片。我測試此代碼:拍攝固定尺寸的圖片
.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/ –