zoukankan      html  css  js  c++  java
  • CSS样式笔记

    组合样式,CSS继承

    .content {
        padding:0 0 0 5px;
        line-height: 30px;
        height: 30px;
        border: 1px solid #a6bee7;
        vertical-align: middle;
    }
    
    /*不加空格,则表示class="content small"且small只有跟在content后面有效,否则无效
    有效,如<div class="content small">则div的宽度是29.如果.content .small有空格,则表示,content的子元素的样式是small,子元素继承content的样式如<div class="content"><div class="small">*/
    .content.small { width: 29%; }
    .content.medium { width: 42.5%; }
    .content.large { width: 92%; }

     设置label标签样式,去掉每行都有边框

    .disabled-label {
        width:90%;
        color:#cccccc;
        border: 1px solid #cccccc;
        display: inline-block;
    }
     <asp:Label ID="Reason" runat="server" CssClass="disabled-label"></asp:Label>

     IE8下 Select文字垂直居中的办法

    .select {
    padding: 4px 0;
    height: 30px;
    line-height: 26px;
    vertical-align: middle;
    }

     让DIV内的li横向居中显示

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
        <style>
            .utop {
       
    }
    
        .utop ul {
            display: table;
            margin-left: auto;
            margin-right: auto;
        }
    
            .utop ul li {
                float: left;
                text-decoration: none;
                border-style: none;
                list-style-type: none;
                padding:4px;
            }
        </style>
    </head>
    <body>
    <div class="utop">
        <ul><li>sd</li><li>sd</li></ul>
    </div>
    </body>
    </html>
  • 相关阅读:
    S2dao 简单Demo(转)
    Iphone SDK textField 打开和关闭键盘
    s2dao 入门知识2
    Eclipse tomcat Web页面调试
    s2dao 入门知识1
    java 面试
    Iphone SDK ActionSheet 在当前窗口弹出时间选择
    杭电2044
    杭电2076
    杭电2077
  • 原文地址:https://www.cnblogs.com/jlove/p/4626825.html
Copyright © 2011-2022 走看看