box-shadow write multiple borders

First the last rendering:
                                                                                 

css:
div.shadow_test{
        box-shadow: 0 0 0 6px rgba(0, 255, 255, 1), 0 0 0 12px rgba(255, 51, 153, 1), 0 0 0 18px rgba(255, 255, 153,1), 0 0 0 24px rgba(153, 102, 204, 1);
        height: 100px;
        margin: 50px auto;
        width: 100px
    }

This method works well and avoids creating multiple DOMs.
Attached box-shadow. Usage:

Reference URL: box-shadow usage

 

Guess you like

Origin blog.csdn.net/qq_37514029/article/details/84993058