Languages
[Edit]
EN

CSS - outline with radius

23 points
Created by:
Root-ssh
178170

In this article, we would like to show how to create an outline with a radius using CSS.

Quick solution:

Outline with radius in CSS.
Outline with radius in CSS.

 

Problem description:
outline does not provide outline-radius style property, so it is necessary to use some tricks (now we have 2021).

Problem solution:

used box-shadow style property with:

  • blur set to 0,
  • spread set to some value,

and defined border-radius style property, give outline with radius effect.

Outline with radius in CSS - Google Chrome DevTools.
Outline with radius in CSS - Google Chrome DevTools.

Practical example

Edit

 

See also

Edit
  1. CSS - outline with padding and radius 

Alternative titles

  1. CSS - rounded outline
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join