diff --git a/components/card/style/index.less b/components/card/style/index.less index 284af50523..1b675d4dab 100644 --- a/components/card/style/index.less +++ b/components/card/style/index.less @@ -4,11 +4,12 @@ @card-prefix-cls: ~"@{ant-prefix}-card"; @card-head-height: 48px; @card-hover-border: rgba(0, 0, 0, 0.09); +@card-radius: @border-radius-sm; .@{card-prefix-cls} { .reset-component; background: @component-background; - border-radius: @border-radius-sm; + border-radius: @card-radius; position: relative; transition: all .3s; @@ -28,7 +29,7 @@ background: @card-head-background; border-bottom: @border-width-base @border-style-base @border-color-split; padding: 0 @card-padding-base; - border-radius: @border-radius-sm @border-radius-sm 0 0; + border-radius: @card-radius @card-radius 0 0; .clearfix; margin-bottom: -1px; // Fix card grid overflow bug: https://gw.alipayobjects.com/zos/rmsportal/XonYxBikwpgbqIQBeuhk.png min-height: @card-head-height; @@ -101,9 +102,14 @@ padding-bottom: 0; } - &-cover > * { - width: 100%; - display: block; + &-cover { + > * { + width: 100%; + display: block; + } + img { + border-radius: @card-radius @card-radius 0 0; + } } &-actions { @@ -232,7 +238,7 @@ &-loading-block { height: 14px; margin: 4px 0; - border-radius: @border-radius-sm; + border-radius: @card-radius; background: linear-gradient(90deg, rgba(207, 216, 220, .2), rgba(207, 216, 220, .4), rgba(207, 216, 220, .2)); animation: card-loading 1.4s ease infinite; background-size: 600% 600%;