0

I'm creating a website where I use the rotate and transform functions in CSS3. I have everything under control, but when I rotate my text, the whole text rotates like with its <p> block. What I want is when rotating my text, keeping the left side of the text in a vertical alignment.

It's hard to explain with words, so I like to refer to this website: Active Theorie

(You can see that they rotate their text like -2 degrees, but keep the vertical alignment of their texts.)

I hope someone here can help me out with this.

Hashem Qolami
  • 97,268
  • 26
  • 150
  • 164
Voltiac
  • 7
  • 4

1 Answers1

1

You can use either css "transform: skew" property e.g.

.text {
    transform: skew(0,-10deg);
}

or if you need perspective view you can use "perspective" and "transform: rotateY" properties e.g.

.parentDiv : {
    perspective: 500px;
}
.text: {
    transform: rotateY(30deg);
}

http://jsfiddle.net/yjo3aanr/

Vasiliy Gorokhov
  • 246
  • 8
  • 10