当前位置:网站首页>line-height小用
line-height小用
2022-06-25 22:05:00 【妄想_wangx】
想要导航栏中的元素上下居中可用line-height(行高)控制。
例如:
下面这个div中,如果其中文字的行高是0,效果是这样的:
把行高改成54px后,效果是这样的:
可以看出,用行高line-height可以很轻松的控制div中文字的所处高度。
防止有小伙伴弄错行高的定义,下面贴一张图说明一下 ↓↓↓

边栏推荐
- C. Planar Reflections-CodeCraft-21 and Codeforces Round #711 (Div. 2)
- UE4 learning records create a role and control its movement
- debezium
- Mutual conversion between QT utf8 and Unicode encoding, and the Unicode encoding output format is &xxxxx
- Summary of common JDBC exceptions and error solutions
- 达梦数据库修改字段信息采坑记
- Ad20 learning notes II
- 树状类查询组件
- Qt 中文和英文分别使用不同的字体
- Go语言逃逸分析全纪录
猜你喜欢
随机推荐
Leetcode (435) - no overlapping interval
Px4 multi computer simulation (gazebo)
C. Fibonacci Words-April Fools Day Contest 2021
如何设计产品的roadmap?
Customize the qcombobox drop-down box, right align the display, and slide the drop-down list
二叉排序树
一文讲透研发效能!您关心的问题都在
Kotlin null pointer bug
mysql
Wireshark对IMAP抓包分析
The simplest screen recording to GIF gadget in history, licecap, can be tried if the requirements are not high
解决‘tuple‘ object has no attribute ‘lower‘
发送邮件工具类
Kylin
Qt自定义实现的日历控件
C. Planar Reflections-CodeCraft-21 and Codeforces Round #711 (Div. 2)
Anaconda一文入门笔记
C1. k-LCM (easy version)-Codeforces Round #708 (Div. 2)
Ad20 learning notes I
Px4 simulation basis









