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) ...
随机推荐
- Guideline 5.2.1 - Legal - Intellectual Property 解决方案
最近在上架公司公司项目的时候遇到这个问题什么5.2.1 然后去了解发现最近不少人都遇到了这个问题.先说一下 我上架的APP是一个医疗的APP然后说需要什么医疗资质,估计是账号的公司资质不够吧.后面和苹 ...
- laravel 分类的列表查询
public function index(Request $request, ResponseFactoryContract $response, QuestionModel $questionMo ...
- Deal with Warning: mysqli::__construct(): (HY000/2002)
1.安装XAMPP之后,如果之前安装过MySQL或者 apache,启动XAMPP中的响应的服务的时候回出现报错, 出错的原因,具体看报错的原因,如果是端口占用,在配置中修改端口号,如果是提示 “Fo ...
- HTML&javaSkcript&CSS&jQuery&ajax(三)
一.HTML块元素 1.块级元素 Block level element ,内联元素 inline element , HTML<div>元素属于块级元素,他是组合其他HTML元素的容器, ...
- Nginx详解七:Nginx基础篇之Nginx官方模块
Nginx官方模块 --with-http_stub_status_module:Nginx的客户端状态,用于监控连接的信息,配置语法如下:配置语法:stub_status;默认状态:-配置方法:se ...
- vue和stylus在subline中显示高亮
首先: 安装这两个插件 Vue Syntax Highlight 和 stylus 1.按住 ctrl + shift + p 2.输入:install Package 3.输入: V ...
- springboot集成druid+mybatis连接oracle数据库
2.1.配置 druid 数据源 2. 随后要进行druid 的数据源的配置,如果要想使用druid 的数据源,那么首先一定要去修改 pom.xml 配置文件,引入以下包: oracle官网下载 oj ...
- Aws云服务EMR使用
Aws云服务EMR使用 创建表结构 创建abc库下的abc_user_i表字段s3://abc-server/abc-emr/shell/ABC_USER_HIVE.q: EXTERNAL 指定为外部 ...
- vscode c++ cmake template project
VSCode configure C++ dev environment claim use CMake to build the project. For debugging, VSCode's C ...
- Java枚举类使用和总结
1.枚举类使用情况一: package com.bie.util; import java.util.HashMap; import java.util.Map; /** * * @author bi ...