zoukankan      html  css  js  c++  java
  • CSS样式表——样式

    样式:

    1)大小

    200px;       或100%;                           //样式中要加单位

    height:100px;

    2)背景

    background-color:背景色;

    background-image:背景图;

    background-repeat:背景图是否拼图;

    background-position:right 20px bottom 20px;              //距右边20像素,距底边20像素

    background-attachment:fixed;                                      //背景图固定

    background-attachment:scroll;                                      //背景图随页面滚动

    background-size:200px 100px;                                      //背景图宽200像素,高100像素

    3)字体

    font-family:微软雅黑;                     //字体

    font-size:10px;                             //字号,网页常用14px/16px,最小12px

    font-style:italic;                              //倾斜

    font-weight:bold;                         //加粗

    text-decoration:underline;           //下划线

          overline / linethrough / none       上划线、字中间横线、没有线

    color:字体颜色;

    4)对齐方式

    text-align:center;                    //水平对齐方式:居中

        left / right                      居左、居右

    vertical-align:middle;                //垂直居中

          top / bottom             顶部、底部

    line-height:200px;                     //行高,要想让文字垂直居中,需要将文字行高调整到和所在<div>一样高

    text-indent:30px;                        //缩进30像素

  • 相关阅读:
    android_SurfaceView 画图
    android_activity_研究(二)
    android_sdcard读写(一)
    双缓冲的小程序
    C++运算符重载小程序
    再练
    菜鸟的第一个博客(用java写的个小文本框)
    LUCENE第一个小程序(有错)
    蜗牛在奔跑
    指定目录下的java文件存储到一个Txt文本文件中
  • 原文地址:https://www.cnblogs.com/cmzhphp2017/p/7463683.html
Copyright © 2011-2022 走看看