/* 去掉浏览器页面默认样式 */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* 给整个页面加上背景图 */
html, body{
    height: 100%;
}

body{
    background-image: url(../img/bg1.gif);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

}

.nav{
    width: 100%;
      /* 一般来说这里的详细尺寸, 都是设计稿中已经标注清楚的了. 此处没设计稿, 具体的尺寸取决于我自己的喜好 */
    height: 50px;
    background-color: rgba(51,51,51,0.4);
    color: white;
     /* 导航栏内部的内容, 都是一行排列的. 就需要使用 flex 布局来进行操作 */
    display: flex;
      /* 实现子元素垂直居中效果 */
    align-items: center;
}

.nav img{
    width: 40px;
    height: 40px;
    border-radius: 50%;

    margin-left: 30px;
    margin-right: 10px;
}

.nav .spacer{
      /* 相对于父元素的宽度, 如果父元素(.nav) 宽度是 1000px, 此时 .spacer 就是 700px */
    width: 70%;
}

.nav a{
    color: white;
    text-decoration: none;
    padding: 0 10px
}

/* 版心相关样式 */
.container{
    /* 当前版心并不是和窗口一样宽的 */
    width: 1600px;
    height: calc(100% - 50px);

    /* 水平居中 */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.container .left{
    height: 100%;
    width: 200px;
}

.container .right{
    height: 100%; 
    width: 1395px;

    background-color: rgba(255,255,255,0.8); 
    border-radius: 10px;

    overflow: auto;
} 


/* 接下来实现card部分样式 */
.card{
    background-color: rgba(255,255,255,0.8);
    border-radius: 10px;

    /* 通过这里的内边距，就可以头像居中 */
    /* 这里设置的30px，意思就是四个方向都是30px */
    padding: 30px;
}

.card img{
    width: 140px;
    height: 140px;
    border-radius: 50%;
}

.card h3{
    text-align: center;
    padding: 10px;
}

.card a{
     /* a 默认是行内元素. 行内元素的很多边距不生效. 为了简单起见, 直接设为块级元素. */
     display: block;
     text-align: center;
     text-decoration: none;
     color: #999;
     padding: 10px;
}

.card .counter{
    display: flex;
    justify-content: space-around;
    padding: 5px;
}
