常用css

时间:2023-03-09 18:42:47
常用css

边框 css

        基本设置:border:1px solid #d2d2d2;    风格有:solid=>实线 double=>双实线 dotted=>点状 dashed=>虚线

       圆角 border-radius: 10px;

文字居中

       vertical-align:middle  上/中/下    text-align:center  左/中/右

鼠标聚焦变成小手

         cursor:point;

td 内字符超出处理

         td {

                border: 1px solid #DDDDDD;
                line-height: 20px;
                overflow: hidden;
                padding: 8px 1px 8px 3px;
                text-align: left;
                text-overflow: ellipsis;
                vertical-align: top;
                white-space: nowrap;
            }

        tr.selected td {

                white-space: normal;
                word-break: break-all;
                word-wrap: break-word;
              }

a 连接常用设置

              a:link {color: blue}     /* 未被访问的链接     蓝色 */
              a:visited {color: blue}  /* 已被访问过的链接   蓝色 */
              a:hover {color: blue}    /* 鼠标悬浮在上的链接 蓝色 */
              a:active {color: blue}   /* 鼠标点中激活链接   蓝色 */

table 内边距为0

        

table.dataTable {
    border-collapse: collapse;
    margin: 10px auto;
    table-layout: fixed;
    text-align: left;
    width: 100%;
}

待续....

css选择器 用法

        .login form input[type="submit"]{}