image.png
    可以通过 box-shadow 来实现边框的层叠效果
    box-shadow可以添加任意多个,所以只需要往四个边添加不同长度的 box-shadow 就能实现层叠效果

    1. > section {
    2. border: 1px solid #05caec;
    3. border-radius: 4px;
    4. position: relative;
    5. box-shadow: 0 0 2px 0 #0e4f5f, inset 0 0 2px 0 #0e4f5f;
    6. background: #052831;
    7. &::before {
    8. content: '';
    9. position: absolute;
    10. left: 0;
    11. right: 0;
    12. bottom: 0;
    13. top: 0;
    14. border-radius: 4px;
    15. box-shadow: 17px 0 0 -16px #0e4f5f,
    16. -17px 0 0 -16px #0e4f5f,
    17. 0 17px 0 -16px #0e4f5f,
    18. 0 -17px 0 -16px #0e4f5f,
    19. 9px 0 0 -8px #107881,
    20. -9px 0 0 -8px #107881,
    21. 0 9px 0 -8px #107881,
    22. 0 -9px 0 -8px #107881;
    23. }
    24. }