css用于双高度文本,双宽度文本用于字体样式 [英] css for double height text and double width text in font style

查看:282
本文介绍了css用于双高度文本,双宽度文本用于字体样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我在css中以字体样式(如点阵打印机)做双倍高度文本和双倍宽度文本,而不使用任何图像。



除此之外的任何代码?

 标题{
font-weight:bold;
width:200%;
}

我预期如下。



>



感谢。

解决方案

OP,



transform transform-origin的供应商前缀:已更新。



希望它有帮助。


Any one can help me to do double height text and double width text in font style(as like in dot matrix printers) in css without using any images.

Any code other than this?

heading{
   font-weight:bold; 
   width:200%;
}

What I expect is as below.

Thanks.

解决方案

OP,

Updated fiddle that includes all vendor prefixes for transform and transform-origin:http://jsfiddle.net/LTaAy/1/

See this fiddle: http://jsfiddle.net/LTaAy/

IMG

HTML

  <p class="doubleWidth">DOUBLE WIDTH</p>
  <p class="doubleHeight">Double Height</p>
  <p class="doubleWidthandHeight">Double Width and Height</p>

CSS

p {
    -webkit-transform-origin: 0 0;
    -moz-transform-origin: 0 0;
}
p.doubleWidth {
    -webkit-transform: scaleX(2);
    -moz-transform: scaleX(2);
}
p.doubleHeight {
    -webkit-transform: scaleY(2);
    -moz-transform: scaleY(2);
}
p.doubleWidthandHeight {
    -webkit-transform: scaleX(2) scaleY(2);
    -moz-transform: scaleX(2) scaleY(2);
}

I only included 2 vendors prefixes, but they should be applied as necessary. - Only true above, This fiddle http://jsfiddle.net/LTaAy/1/ has been updated.

Hope it helps.

这篇关于css用于双高度文本,双宽度文本用于字体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆