1. *{
    2. margin: 0;
    3. padding: 0;/*去除白边框*/
    4. }
    5. body{
    6. height: 100%;/*设置宽度*/
    7. background-color: #00CED1;/*设置主页面背景色*/
    8. }
    9. span{
    10. overflow: hidden;/*超出的部分不显示*/
    11. display: block;/*使其成为转化为块级标签*/
    12. width: 16px;/*为其设置宽度和高度方便后面圆角色荷治*/
    13. height: 16px;
    14. margin: 30px auto 40px;/*设置位置居中显示*/
    15. border-radius: 50%;/*圆角设置*/
    16. background-color: white;/*设置背景色*/
    17. }
    18. .avr{
    19. position: relative;/*设置相对定位*/
    20. display: flex;/*弹性布局 能够将显示的部分随着窗口的大小改变大小*/
    21. width: 50vw;/*vw相对单位,1vw等于可视窗口宽度的%1*/
    22. margin: 0 auto 45px;
    23. justify-content: space-between;/*与display: flex;配合使用 可以让元素再容器中左右均匀分布 最长用于移动端开发
    24. 内容对齐(justify-content)属性应用在弹性容器上,把弹性项沿着弹性容器的主轴线(main axis)对齐。*/
    25. }
    26. .avr>a{
    27. font-size: 15px;/*设置字体大小*/
    28. padding: 10px;/*从盒子内部向外撑开*/
    29. border:2px solid #5395b4;/*设置边框*/
    30. color: #255d7e;
    31. text-decoration: none;/*去除a标签原有的下划线*/
    32. background-color: white;
    33. z-index: 2;/*设置层级关系将等会用伪元素添加的线藏在下面*/
    34. }
    35. .avr::before{/*伪元素它是一个行级元素*/
    36. content:"";/*有内容只是没添加 激活伪元素 必须得添加这个不然无法显示*/
    37. position: absolute;/*添加绝对定位*/
    38. top: 18px;
    39. width: 98%;
    40. height: 10px;
    41. background-color: white;
    42. display: block;/*使元素变成块级 这样设置宽高才有效果*/
    43. z-index: 1;/*伪元素添加的这个藏在a标签的后面*/
    44. }
    45. .dpl{
    46. position: relative;/*相对定位设置*/
    47. overflow: hidden;/*影藏溢出清楚浮动*/
    48. width: 50vw;
    49. height: 75vh;/*相对单位,1vw等于可视窗口高度的1%*/
    50. margin: 0 auto;/*居中显示*/
    51. background-color: white;
    52. box-shadow: 0 0 30px 0 rgba(8,1,3,0.3);/*设置盒阴影*/
    53. }
    54. .dpl>img{
    55. position: absolute;/*绝对定位*/
    56. top: 0;
    57. right: 0;
    58. bottom: 0;
    59. left: 0;
    60. width: 98%;
    61. height: 98%;/*设置比div盒子小一点形成白色边框*/
    62. margin: auto;/*居中显示*/
    63. }