当前位置: 首页 > 工具软件 > CSS Usage > 使用案例 >

Tips about CSS usage

丌官利
2023-12-01

Tips About Css

usage of calc()

  • for the content in calc, especially for operator + -, we need to keep space before or after them. otherwise, they will not be regonized by browser.
    *{
        width:calc(2.1% + 40px);
    }

usage of Line-height

line-height:2, image we have a single line in the middle of the text we target. 2/2=1Xown-font-sizespace will be above, and same below. So, if we don't specify
the height of the element, the text will always be vertical center, if we spedify it, we can keep the line-height same to the height to keep content vertical center.

转载于:https://www.cnblogs.com/kongshu-612/p/7450356.html

 类似资料:

相关阅读

相关文章

相关问答