Sunday, November 10, 2013

For IE you can not do without mysisterwifescloset filters (filters bad because guzzle memory, antia


Previously, there was presented an article about how to make vertical text images generated by php. Now I want to tell you about how to do the task without pictures, flash and js, html, and only by means of css. In addition, mysisterwifescloset it was possible to make the text at any angle. At the end of the article there is a ready example. Cross-browser: Internet Explorer 6, 7, 8, Mozilla Firefox 2, 3, Opera 9, Safari 3, Google Chrome (webkit) Restrictions: may only make the text on one line, and in the block with a fixed size in pixels. Let's start: So, we need a framing unit with the specified width and height, as well as line height equal to the width of the block (for the alignment of text in the middle): css:. Vertical {overflow: hidden; line-height: 30px; position: relative; white -space: nowrap; width: 30px; height: 200px; border: 1px solid # 999;} html: <div class="vertical"> </ div> For modern browsers will use the svg: css:. vertical object {width: 30px; height: 200px; display: block;} - set the width and height equal to the height equal to the width of the bounding mysisterwifescloset box. html: <object type = "image / svg + xml" data = "data: image / svg + xml; charset = utf-8, <svg xmlns='http://www.w3.org/2000/svg'> <text x='-200' y='18' font-family='Arial' font-size='12' fill='#000000' transform='rotate(-90)' text-rendering='optimizeSpeed'> vertical text </ text> </ svg> "> </ object> - x = '-200' - coordinate of the beginning of a line of text from the top of the object, y = '18 '- coordinate of the baseline of the line of text from the left side of the object, font -family = 'Arial' font-size = '12 '- size, typeface, fill =' # 000000 '- the color of the text, transform =' rotate (-90) '- rotate the text by -90 degrees. we can rotate text to any angle for all versions of IE: Because even IE version 8 does not support svg (the developers said that they had and it was a lot of work), we use the special properties: writing-mode: tb-rl; - the text is placed vertically from top to bottom and right to left filter: flipv () fliph (); - flip it horizontally and vertically. css:. vertical object mysisterwifescloset {display: none;} - hide svg. . Vertical span {filter: flipv () fliph (); writing-mode: tb-rl; display: block; position: absolute; left: 0; bottom: 0; height: 200px; width: 30px;} html: <span > vertical text </ span> for the text at an angle css looks like this:. vertical3 span {top:-8px; left:-31px; width: 200px; writing-mode: lr-tb; filter: progid: mysisterwifescloset DXImageTransform.Microsoft.Matrix (M11 = '0 .985 ', M12 =' -0.174 ', M21 = '0 .174', M22 = '0 .985 ', SizingMethod = auto expand );} top, left - empirical mysisterwifescloset values. found experimentally. M11 = cos (angle in degrees) M12 =-sin (angle in degrees) M21 = sin (angle in degrees) M22 = cos (angle degrees) do not take negative values! if we have to turn 45 degrees to the values of the trigonometric functions take the angle of 315 degrees. Bottom line: We got a way with which you can make a vertical and italic text in all major browsers, allowing you to use it on a real project, if it is really necessary. Specifically, in my case, this has helped to guess the real project - online bookshop in which the designer has drawn cart, bookshelf, mysisterwifescloset in which the names of books for purchase have been written on the spine. Ready example: www.site-creator.info/html/vertical-text.php PS Thanks enternet for helping get rid of the hacks for Safari and Google Chrome PPS Added example of text at any angle. PPPS If you are using the material of the paper, mysisterwifescloset specify a link to this article! Here I will add sites with illegal copying of 0. the site was, but corrected If the author of such an article will point source, it's gone from the list.
Impressive in a stylish slim metal
try replacing the position: absolute; left:-9999px; top:-9999px; on display: none; and look in safari and chrome. mysisterwifescloset text-generated through svg not hidden
the reliability can be further height: 0; width: 0, since the element to visibility: hidden can still affect the layout (in general cases, but in this span is in position: absolute; so that no matter)
For IE you can not do without mysisterwifescloset filters (filters bad because guzzle memory, antialiasing (if the text is in an unknown background is not correct), and, at times, behave unpredictably with animation). layout-flow: vertical-ideographic (for IE7 and below) and the-ms-layout-flow: vertical-ideographic (for IE8 in standard mode).
+2 Devgru, May 2, 2009 at 18:26 #
In this case, support for CSS3 IE went to all :) (I mean writing-mode). Flipnuty text incorrectly allocated (and it is clear flip purely visual effect), but when you consider that svg does not stand out as the text is all about.
It depends on where to look. In the opera, svg stands out as text. In Safari, mysisterwifescloset is done through the-webkit-transform stands there too, will soon be FF3.5 it can be done via the-moz-transform and there t

No comments:

Post a Comment