CSS fold div

Is it possible to bend a div using CSS?

Some webkit conversion ...

The effect I want to create is to have a donut ring shape, but consisting of a curved div, unlike border-radius / border tricks

EDIT:

Use case - I would like to put a linear gradient in this div and wrap the gradient around myself, as in Snake, where it chases its tail ...

+6
source share
4 answers

This is currently not possible with CSS. It is best to use canvas (and some Javascript).

https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas

http://www.roblaplaca.com/examples/bezierBuilder/

+3
source

This is not like you cannot use a border trick:

http://www.w3schools.com/css3/css3_2dtransforms.asp

The border radius trick is the one I like,

http://jsfiddle.net/charlescarver/ea3An/

0
source

If you want the text to be crooked, this is a problem with the ability of SVG Text on the Path . (or canvas). Enjoy it.

0
source

I recommend using THREE.js and the HTML5 canvas tag. You can easily bend and revitalize it. Check out the examples. Have some fun!

Examples THREE.js

-1
source

Source: https://habr.com/ru/post/903878/


All Articles