I am trying to display a profile photo similar to this / - / (slashes are inclinations using skewX, the hyphen is the horizontal alignment of the background image).
The problem is that this code also distorts the background image:
.photo { transform: skewX(35deg); -ms-transform: skewX(35deg); -webkit-transform: skewX(35deg); width: 100px; height: 92px; border-right: 1px solid black; border-left: 1px solid black; background-image: url('silhouette.png'); background-repeat: no-repeat; background-position: top left; } ... <div class="photo"></div>
I tried to change the focus like this:
.photo { transform: skewX(35deg); -ms-transform: skewX(35deg); -webkit-transform: skewX(35deg); width: 100px; height: 92px; border-right: 1px solid black; border-left: 1px solid black; } .photo div { transform: skewX(-35deg); -ms-transform: skewX(-35deg); -webkit-transform: skewX(-35deg); width: 100%; height: 100%; background-image: url('silhouette.png'); background-repeat: no-repeat; background-position: top left; } ... <div class="photo"><div></div></div>
... but I get / [-] / (the background doesn't fit the meaning with the stand).
I was here all day, please help me? I have a bock encoder!
source share