From 55a157bca1b106ad40ad1016e1f257ac33bda023 Mon Sep 17 00:00:00 2001 From: async_await Date: Mon, 4 May 2020 23:37:33 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front-end/h5/src/components/common/work/card-cover.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/front-end/h5/src/components/common/work/card-cover.js b/front-end/h5/src/components/common/work/card-cover.js index 5907b79c..aef2a148 100644 --- a/front-end/h5/src/components/common/work/card-cover.js +++ b/front-end/h5/src/components/common/work/card-cover.js @@ -18,9 +18,10 @@ function getDefaultStyle (img, isPlaceholder) { zIndex: 0, height: '100%', width: '100%', - backgroundSize: isPlaceholder ? 'contain' : 'cover', - backgroundRepeat: 'no-repeat', - backgroundImage: `url(${img})` + backgroundSize: 'contain', +    backgroundRepeat: 'no-repeat', +    backgroundPosition: 'center', +    backgroundImage: `url(${img})` } }