图片截取部分显示
圖片截取中間部分顯示,不會變形
<span className="js_img_icon" src="https://mmbiz.qlogo.cn/mmbiz/BZhpicRGKHEWcYRO0nRYHicdCVGk1C9QFZ3LVibPgic5AcCTkc9FYricibUZxhO3E9OvT8hYpd4PQ11wsb0goB7aPm1Q/0?wx_fmt=jpeg"></span>
.js_img_icon {
display: block;
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
background-image: url(https://mmbiz.qlogo.cn/mmbiz/BZhpicRGKHEWcYRO0nRYHicdCVGk1C9QFZ3LVibPgic5AcCTkc9FYricibUZxhO3E9OvT8hYpd4PQ11wsb0goB7aPm1Q/0?wx_fmt=jpeg);
width: 169px;
height: 169px;
text-align: center;
}
?
?顯示情況:
原圖:
?
轉載于:https://www.cnblogs.com/liuna/p/6933418.html
總結
- 上一篇: NetMarketShare:本月桌面浏
- 下一篇: 《正则表达式经典实例(第2版)》——2.