:root {
    --background-color: #1b2733;
    --border-color: #7591AD;
    --text-color: #34495e;
    --color1: #EC3E27;
    --color2: #fd79a8;
    --color3: #0984e3;
    --color4: #00b894;
    --color5: #fdcb6e;
    --color6: #e056fd;
    --color7: #F97F51;
    --color8: #BDC581;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    width: 100vw;
    height: 100vh;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Montserrat', sans-serif, Arial, 'Microsoft Yahei';
}

.container {
    position: fixed;
    width: 600px;
    height: 300px;
    overflow: hidden;
    /* 一定要开启flex布局 */
    display: flex;
    justify-content: center;
    align-items: center;
    /* 缩小0.8，方便演示 */
    /* transform: scale(0.8); */
}

.pic {
    position: relative;
    /* flex布局下当前元素自动缩放时占比为1，当前所有的pic元素占比均为一，等于所有元素大小保持一致的缩放 */
    flex-shrink: 1;
    flex-grow: 1;
    /* 一定要开启 */
    /* 要不然超出的图片会把pic图层撑开，失去最终效果 */
    overflow: hidden;
    transition: 1s;
}

.pic:hover {
    flex-shrink: 0;
    flex-grow: 0;
}


/* 基本功能实现，细节美化 */

.title {
    position: absolute;
    color: #fff;
    background-color: #1b273370;
    bottom: 0;
    width: 100%;
    text-align: center;
    line-height: 30px;
}