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

边栏推荐
猜你喜欢

qtcreator 格式化代码

后序线索二叉树

实例:用C#.NET手把手教你做微信公众号开发(21)--使用微信支付线上收款:H5方式

(serial port Lora module) centrida rf-al42uh private protocol test at instruction test communication process

Uniapp -- the use of document collation and push of unipush

CSDN add on page Jump and off page specified paragraph jump

hiberate架构介绍及环境搭建(非常详细)

UE4 learning record 2 adding skeleton, skin and motion animation to characters

Leetcode-1528- rearrange string - hash table - string

Kotlin空指针Bug
随机推荐
Record the ideas and precautions for QT to output a small number of pictures to mp4
Episode 3: thread synchronization using thread lock
idea 查看单元测试覆盖率
The package name of the manifest file in the library project and the app project are not the same
自定义QComboBox下拉框,右对齐显示,下拉列表滑动操作
Run the dronekit flight control application on Shumei faction under px4-jmavsim software simulation environment
Qt 中文和英文分别使用不同的字体
BI-SQL丨存储过程(一)
Classic image segmentation network: UNET supports libtorch deployment reasoning [with code]
平衡二叉树AVL
Visual studio code create minimal web API (asp.net core)
Px4 simulation basis
QComboBox下拉菜单中有分隔符Separator时的样式设置
String object (constant) pool
Hibernate core api/ configuration file / L1 cache details
史上最简单的录屏转gif小工具LICEcap,要求不高可以试试
C. Planar Reflections-CodeCraft-21 and Codeforces Round #711 (Div. 2)
YUV444、YUV422、YUV420、YUV420P、YUV420SP、YV12、YU12、NV12、NV21
SSL/TLS、对称加密和非对称加密和TLSv1.3
[Axi] interpretation of Axi protocol disorder mechanism