开发者

Positioning rotated span css

I've got a <span class="name"> next to an <img> inside a <div>. Inside this span I have some text which I want to turn 90 degrees.开发者_开发知识库 However, when I do this (as code suggests below) the span ends up in a somewhat weird position on top of the image.

In IE, the text doesn't rotate at all.

.name {
  display: block;
  -webkit-transform: rotate(-90deg);
  -moz-transform: rotate(-90deg);
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}

Any suggestions as to how I solve this?

Positioning rotated span css

Positioning rotated span css


I've fixed this on my own what I needed to do was put a fixed size on the span and then use position:absolute; to position it where I wanted it


I'm not sure how to fix it. But the reason it doesn't rotate in IE is that you are using "webkit" and "moz" to rotate - which are firefox-like-browser specific functions. You'll have to google for an IE-equivalent.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜