html 水平竖直居中
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 水平竖直居中的更多相关文章
- 水平/竖直居中在旧版Safari上的bug
今天调了两个出现在旧版Safari上的layout bug. 它们最初是在同事的iPad上被发现的, 我在自己桌面上安装的Safari 5.1.7上也能够复现. Bug1: .vertical-cen ...
- css水平竖直居中方式
CSS水平和垂直居中的几种实现方法: 1.单行垂直居中 文字在层中垂直居中vertical-align 属性是做不到的.我们这里有个比较巧妙的方法就是:设置height的高度与line-height的 ...
- 常用布局,div竖直居中
常用两列布局,多列布局和div竖直居中 body { margin:; padding:; } .w200 { width: 200px; } .mar-left200 { margin-left: ...
- css水平居中,竖直居中技巧(二)
css水平居中,竖直居中技巧(二)===### 1.效果 ### 2.代码#### 2.1.index.html <!DOCTYPE html> <html lang="z ...
- css水平居中,竖直居中技巧(一)
css水平居中,竖直居中技巧(一)===### 1.效果 ### 2.代码#### 2.1.index.html <!DOCTYPE html> <html lang="z ...
- html的a标签display:block之后文字竖直居中
设置行高和a标签的高度一样就能居中,使用line-height
- UITextField竖直居中对齐
http://blog.sina.com.cn/s/blog_87533a0801012nv0.html 用xib生成的UITextField文字默认是水平左对齐,垂直居中对齐的,但是用代码生成的UI ...
- CSS -- 文字竖直居中
元素的height 和 lineheight 设置为一样即可.
- Vertical Center TextView . 竖直居中的UITextView
@interface VerticalCenterTextView : UITextView @end @implementation VerticalCenterTextView - (void) ...
随机推荐
- winform数据存储的方式
存储的方式有三种: 一.SQL数据库 二.Access(office 2007版本以上是需要安装驱动的) 三.XML
- js 获取当前的网址
http://www.xcx.cc/index.php/home/index/ind?idf=12321var $cur_url=window.location.href; //获取全部的网址var ...
- MobileNet V2
https://zhuanlan.zhihu.com/p/33075914 http://blog.csdn.net/u011995719/article/details/79135818 https ...
- django 中的闪现
导包 from django.contrib import messages #输出格式 messages.success(request,'不能为空') #前端页面的写法 {%if messages ...
- cf1107e uva10559区间dp升维
/* 区间dp,为什么要升维? 因为若用dp[l][r]表示消去dp[l][r]的最大的分,那么显然状态转移方程dp[l][r]=max{dp[l+1][k-1]+(len[l]+len[k])^2+ ...
- python操作注册表
#注册表操作 # -*- coding: utf-8 -*- import win32api import win32con #打开注册表:传主键化值,子键值,操作方法(win32con.KEY_AL ...
- oracle数据库无法连接 The Network Adapter could not establish
Caused by: java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection 这个错误 ...
- java读取pdf和MS Office文档
有时候PDF中的文字无法复制,这可能是因为PDF文件加密了,不过使用PDFBox开源软件就可以把它读出来. 还有一个用于创建PDF文件的项目----iText. PDFBox下面有两个子项目:Font ...
- Python初探list
今天要说一个新概念--list,中文可以翻译成列表,是用来处理一组有序项目的数据结构.想象一下你的购物清单.待办工作.手机通讯录等等,它们都可以看作是一个列表.说它是新概念也不算确切,因为我们之前已经 ...
- sqoop无法导出parquet文件到mysql
1.问题描述 在CDH集群中我们需要将Hive表的数据导入到RDBMS数据库中,使用Sqoop工具可以方便的将Hive表数据抽取到RDBMS数据库中,在使用Sqoop抽取Hive Parquet表时作 ...