Sowmya
Sowmya

Reputation: 26989

css3 text rotation

How do I flip the text horizontally in my code.

When I try the -90deg in plain code, it is working but it is not working when I add that into my working sample. Currently I have h3 text rotated but I need tat to be faced to the left (Means flip it horizontaly)

Here is the DEMO

Upvotes: 0

Views: 159

Answers (2)

Ana
Ana

Reputation: 37178

transform: scaleX(-1);

You don't use rotate for flipping, you use scale - scaleX(-1) for flipping horizontally, scaleY(-1) for flipping vertically - demo.


In your example however, what you do need is a -90deg rotate, remove the transform-origin(let it take its default value) and change the margin.

DEMO

Upvotes: 2

brush51
brush51

Reputation: 5781

Try to use positive values.

Also see here:

http://css-infos.net/property/-webkit-transform

Example:

p {
  -webkit-transform: rotate(45deg);
}

Upvotes: 1

Related Questions