vertical-text

Vertically center rotated text with CSS

我们两清 提交于 2019-11-26 23:59:54
问题 I have the following HTML: <div class="outer"> <div class="inner rotate">Centered?</div> </div> div.outer is a narrow vertical strip. div.inner is rotated 90 degrees. I would like the text "Centered?" to appear centered in its container div. I do not know the size of either div in advance. This comes close: http://jsfiddle.net/CCMyf/2/. You can see from the jsfiddle that the text is vertically centered before the transform: rotate(-90deg) style is applied, but is somewhat offset after. This

Is it possible to write vertically in a textview in android?

前提是你 提交于 2019-11-26 05:35:16
问题 Let\'s say you have a normal TextView, with \"Stackoverflow\" written in it, Is it possible to rotate the TextView by -90°, to have the S at the bottom and the W at the top of the screen? Of course I could write my text as an image, rotate it and use it that way, but I am interested in the text right now. Thanks. 回答1: You can set your textview as you would normally do for example: <TextView android:id="@+id/txtview" android:layout_height="fill_parent" android:layout_width="wrap_content" />