S
S
szQocks2020-04-19 21:10:20
css
szQocks, 2020-04-19 21:10:20

How to lay out an oblique block in an adaptive?

I know that through clip-path: polygon you can make an oblique block, but when adaptive, the content floats PPC how and, I already tried to fix the internal content somehow through paddings and majins, of course, you can set the positioning of the container in which the content ... but xs xs, what are your options?

Experienced typesetters have come across this anyway, and I think it makes no sense to throw some code or screenshots here, the question is the simplest in my opinion, if there are experienced typesetters here who have gone through this problem in easy, they will prompt the implementation of this issue.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rustam Bainazarov, 2020-04-20
@szQocks

For some reason, everyone forgets that clip-path supports coordinates via calc() , which eliminates all problems with adaptability and connection of blocks, regardless of the amount of content, block width.

clip-path: polygon(0% 0%, 100% calc(0% + 60px), 100% calc(100% - 60px), 0% 100%);
/* calc(100% - 60px) -- вот тут задал четкую ширину скоса */


How to make slanted blocks in css?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question