Auto line-height

联合创作 · 2023-10-02 16:13

Adjusts the line-height of selected elements in proportion to their width, relative to the font size.

Requires

Use

     $(function(){
        $('#flexme').autolineheight();
     });

Where ‘flexme’ is the id of an element in your page whose contained text is to be fine tuned.

Settings

You may adjust the default values to your taste and circumstance when you assign the behaviour to an element, for example:

     $('#flexme').autolineheight({minWidth:16,minLineHeight:1.2,ratio:.03});

More

Further details can be found on my blog post: Auto line-height: a jQuery plugin for flexible layouts

浏览 2
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报