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) ...
随机推荐
- 密码正确 mysql无法登陆 red7.3 上安装mysql5.6后登录报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passswd :yes)
集群需要mysql存储元数据,就在前几天还运行好好的,突然就进不去了......还是太菜,遇到的bug少. 引起这种故障的原因有很多......第一个坑比较多,大部分用户也就用第一个就可以解决问题,我 ...
- 死磕安卓前序:MVP架构探究之旅—基础篇
前言 了解相关更多技术,可参考<我就死磕安卓了,怎么了?>,接下来谈一谈我们来学习一下MVP的基本认识. 大家对MVC的架构模式再熟悉不过.今天我们就学习一下MVP架构模式. MVC和MV ...
- 瑞联科技:Pwp3框架 调用存储过程返还数据集合 到前端界面展示
一:代码结构: 1:Js 代码结构 2:Java 代码结构 二:前端界面展示效果 为了数据安全性:界面数据做了处理 三:全端代码展示 1:main.vop <html> <head& ...
- windows+mysql集群搭建-三分钟搞定集群
注:本文来源: 陈晓婵 < windows+mysql集群搭建-三分钟搞定集群 > 一:mysql集群搭建教程-基础篇 计算机一级考试系统要用集群,目标是把集群搭建起来,保证一 ...
- Confluence 6 在数据源连接中启用校验查询
确定 Confluence 在数据库连接池中校验数据库连接: 停止 Confluence. 编辑 <installation-directory>/conf/server.xml 文件(或 ...
- 【java】转:Windows系统下面多个jdk版本切换
转自:https://blog.csdn.net/iamcaochong/article/details/56008545 1.系统-高级系统设置-环境变量 里面的Path值最前面的C:\Progra ...
- nginx安装编译参数
- vue 中动态绑定class 和 style的方法
先列举一些例子 :class="['content',{'radioModel':checkType}]" :class="['siteAppListDirNode',{ ...
- JMeter 中对于Json数据的处理方法
JMeter中对于Json数据的处理方法 http://eclipsesource.com/blogs/2014/06/12/parsing-json-responses-with-jmeter/ J ...
- 步步为营-75-Cookie简介
说明:cookie常用于数据保存 1 使用 //创建cookie Response.cookies["yk"].value ="xyxtl"; //设置过期时间 ...