Outline radius?

488    Asked by LiamNELSON in Python , Asked on Jun 12, 2021

Is there anyway of getting rounded corners on the outline of a div element, similar to border-radius?

Answered by Krishna Dwivedi

To solve css outline radius, you can try using box-shadow like this:

 /* Smooth outline with box-shadow: */
    .text1:focus {
        box-shadow: 0 0 3pt 2pt red;
    }
    /* Hard "outline" with box-shadow: */
    .text2:focus {
        box-shadow: 0 0 0 2pt red;
    }





Note: You can smoothen the look of the shadow, but the shadow can be hardened to simulate a rounded outline.



Your Answer

Interviews

Parent Categories