W
W
wd-3152020-02-23 14:57:24
css
wd-315, 2020-02-23 14:57:24

Why doesn't border-radius round the entire area of ​​the block, and what is the best element to use?

Sketched a little code, something like a dash game.
For the hit area, I chose a regular block, rounded and filled it, it looks normal outwardly, but for some reason the area of ​​the block itself remains the same after rounding. The corners of the block are found adjacent.
This is visible when the outline property is set, I noticed this before, but somehow it was never needed.
Can this be fixed somehow?
If not, what would you recommend to use in this case, maybe canvas?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Fedorov, 2020-02-23
@aliencash

.elem:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,60,255,.5);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question