zoukankan      html  css  js  c++  java
  • 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  删除线

  • 相关阅读:
    Web.config Transformation Syntax for Web Application Project Deployment
    xcode 8.1 (8B62)真机调试配置
    主机与虚拟机互ping
    mac系统下安装mysql步骤
    iphone设备尺寸规格
    linux环境下oracle静默安装
    实现静默安装APK的方法
    mac系统下如何删除银行安全插件
    mac系统下设置eclipse的补全快捷键方法
    给Xcode增加复制行、删除行快捷键的方法
  • 原文地址:https://www.cnblogs.com/cxhzy/p/10082253.html
Copyright © 2011-2022 走看看