Is it possible to change inline text height, not just the line-height?

前端 未结 8 1860
面向向阳花
面向向阳花 2021-01-01 10:23

I am wondering if it\'s possible to change the height of inline text, without stretching the font, and without changing the line height in css.

An issue comes up whe

相关标签:
8条回答
  • 2021-01-01 10:49

    http://www.css3.com/css-font-stretch/

    This command will help you to solve problem

    This will help you!

    0 讨论(0)
  • 2021-01-01 10:53

    You can increase the height, width of a text using transform property. For instance: transform: scale(0.7, 1.0);

    1. The first value inside the scale property changes width of the letter/text.
    2. And the second value changes the height of the letter/text.

     **h1 {
        font-size: 60px;
        transform: scale(0.7, 1.0);
        margin-left: -90px 
    }**

    I used margin to align the text's

    Note: Its always a best practice to use Vendor Prefixes

    • -webkit- (Chrome, Safari, newer versions of Opera.)
    • -moz- (Firefox)
    • -o- (Old versions of Opera)
    • -ms- (Internet Explorer)

    Example: -webkit-transform: scale(0.7, 1.0);

    0 讨论(0)
提交回复
热议问题