Javascript, Can I stretch text vertically
Can I Stretch text in javascript? I dont want the font b开发者_如何学编程igger because that makes it appear bolder than smaller text beside it, I just want to stretch the text vertically so its kind of deformed . This would be one div id and then normal text beside it would be another div id. Any ideas?
Thanks, -Matthew
Note: I asked this question originally in the CSS section and all anyone could recommend was horizontal stretching by setting the spacing negative.
The answer is 'no' since you cannot access the glyph of a font as a graphic object. You might be able to using HTML5's canvas object, but that is not widely supported (yet.)
Perhaps this link about cross-browser CSS transforms will help? It appears that you can specify a transformation matrix to render any (?) HTML element and there are built-in functions for scaling and skewing, etc.
精彩评论