Page 1 of 1

Wie rotiere ich den äußeren Div, ohne den inneren Inhalt zu drehen?

Posted: 13 Apr 2025, 01:57
by Anonymous
Wie man ein Bild in eine DIV einreicht und diese DIV bei 45 Grad gedreht wird?

Code: Select all

.profile-photo { width: 210px; height: 210px; position: absolute; left: 43px; bottom: -153px; border: 8px solid #000; border-radius: 60px; transform: rotate(45deg); overflow: hidden; z-index: 2; background: #ddd; }

.profile-photo img { max-width: 100%; transform: rotate(-45deg); }< /code>

[img]https://i.sstatic.net/2frrVf0M.jpg[/img]