E
E
emeryshow2018-11-01 19:43:41
css
emeryshow, 2018-11-01 19:43:41

How to insert an element into a frame?

How to make such a block:
5bdb2ce2c1b8c082914631.jpeg
The problem is exactly the icon inside the stroke...
There is an idea to make an image with a white background through before, but this is probably not the best solution.
Help me please)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey delphinpro, 2018-11-01
@emeryshow

This is where the basic principle of building such frames should become clear
https://codepen.io/the_human_brian/pen/vOrbBG

S
Stalker_RED, 2018-11-01
@Stalker_RED

If a transparent background is not required, then the norms
If required, then you will also have to make the top ridges a pseudo-element

M
Matvey Phoenix, 2018-11-01
@mtvphnx

Exactly the solution you wrote is the simplest and best.
Either we simply put a child block with absolute and a white background inside the relative parent block, or we generated it through the :before pseudo-element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question