CSS疑难杂症
2024-10-19 19:31:34
1、text-align: center + letter-spacing: 2em 字体不居中
办法:添加text-indent: 2em
2、first-child伪类选择不到元素
办法:确保备选元素必须是父元素物理上的第一个子元素,即必须紧挨着父元素
3、多行文字垂直居中
办法:
a 固定行高:父元素 display: table 子元素:display: table-cell + vertical-align: middle
b 不固定行高:父元素 padding-top = padding-bottom = 某值
持续更新中
最新文章
- ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题
- ulua 路径小记 以及 lua require 机制整理
- MongoDB 介绍
- 20160620001 FileUpload控件获取上传文件的路径
- 通过email分享
- Node之express
- springBoot系列教程04:mybatis及druid数据源的集成及查询缓存的使用
- Review: Command-line about Git
- spark1.3.x与spark2.x启动executor不同的cpu core分配方式
- IDEA开发环境中快捷键与系统 QQ等冲突的解决办法
- 【NLP CS224N笔记】汇总
- 《深入理解Java虚拟机》(六)堆内存使用分析,垃圾收集器 GC 日志解读
- Python基础知识:字符串
- Python Django 之 简单入门
- zw版【转发·台湾nvp系列Delphi例程】HALCON BitXor
- Leetcode 94
- websocket protocal
- 移动立方体算法(Marching cubes algorithm)
- Unsupervised learning, attention, and other mysteries
- The Properties of Posterior of Topic Model