line-height:容器高度
<!DOCTYPE html><html lang="en"><head> ???<meta charset="UTF-8"> ???<title>Title</title> ???<style> ???????* { ???????????margin: 0; ???????????padding: 0; ???????} ????????/* ?????????white-space: ?换行方式 ???????????normal 正常换行 ???????????nowrap 不换行 ?????????*/ ????????/* ???????text-indent 首行缩进(em) ???????line-height 行高 ?***** ???????letter-spacing 字距 ???????word-spacing 词距 ???????*/ ????????/* ??????text-align 文本水平对齐方式 ??????left 默认值 向左对其 ??????right ??????center ??***** ??????*/ ????????/* ??????text-transform 文本大小写 ??????none 默认值 无转换发生 ??????uppercase ?转换成大写 ??????lowercase ?转换成小写 ??????capitalize 将英文单词的首字母大写 ??????*/ ???????p{ ???????????width: 400px; ???????????background: aqua; ???????????/*white-space: nowrap;*/ ???????????text-indent: 2em; ???????????line-height: 30px; ???????????/*letter-spacing: 5px;*/ ???????????/*word-spacing: 20px;*/ ???????????/*text-transform: uppercase;*/ ???????????/*text-transform: lowercase;*/ ???????????text-transform: capitalize; ???????} ???????div{ ???????????width: 50px; ???????????height: 50px; ???????????background: antiquewhite; ???????????line-height: 50px; ???????????text-align: center; ???????????/*text-decoration: underline;*/ ???????????/*text-decoration: overline;*/ ???????????text-decoration: line-through; ???????} ????????/* ??????text-decoration 下划线 删除线 上划线 ?????***** none ?默认值,可以用这个属性去掉已经有下划线或者删除线或者上划线的样式 ??????underline ?下划线,一般用于文章的重点表明 ??????overline ??上划线 ??????line-through ?删除线 ??????*/ ???????a{ ???????????text-decoration: none; ???????} ???</style></head><body> ???<p>Python [1] ?(英国发音:/?pa?θ?n/ 美国发音:/?pa?θɑ?n/), 是一种面向对象的解释型计算机程序设计语言,由荷兰人Guido van Rossum于1989年发明,第一个公开发行版发行于1991年。</p> ???<div>1</div> ???<a href="#">55555</a></body>
text-align: center 水平居中
text-decoration:none 去掉划线
text-decoration:overline 上划线
text-decoration:underline 下划线
text-decoration:line-through 删除线
html 水平竖直居中
原文地址:https://www.cnblogs.com/cxhzy/p/10082253.html