zoukankan      html  css  js  c++  java
  • div box container随主体内容自动扩展适应的实现

    /**顶部部分*/
    .con-tl{
        background:url(../images/left.png) no-repeat 0 0 rgba(0, 0, 0, 0);
        padding-left: 26px;/*padding-left的值为左边的圆角图片的宽度,必须指定**/
    }
    .con-tr{
        background:url(../images/right.png) no-repeat right 0 rgba(0, 0, 0, 0);
        padding-right: 26px;/*padding-right的值为右边的圆角图片的宽度,必须指定**/
    }
    .con-tc{
        background:url(../images/center2.png) repeat-x 0 0 rgba(0, 0, 0, 0);
        height: 40px;/*这个为中间的横向平铺图片的高度,必须指定*/
        line-height: 40px;
        overflow: hidden;    
    }
    .con-tc-title{
        color: #FFFFFF;
        float: left;
        font-size: 12px;
        font-weight: bold;
        margin-left: 5px;
    }
    /*中间部分*/
    .con-cl{
        background:url(../images/border_dian.png) repeat-y;
        padding-left: 1px;/*padding-left的值为左边的纵向平铺图片的宽度**/
    }
    .con-cr{
        background:url(../images/border_dian.png) repeat-y right 0;
        padding-right: 1px;/*padding-right的值为右边的纵向平铺图片的宽度**/
    }
    .con-cc{
        padding: 0;
        
    }
    /*底部部分*/
    .con-bl{
        background:url(../images/left.png) no-repeat 0 0;
        padding-left: 26px;/*padding-right的值为左边的圆角图片的宽度,必须指定**/
    }
    .con-br{
        background:url(../images/right.png) no-repeat right 0;
        padding-right: 26px;/*padding-right的值为右边的圆角图片的宽度,必须指定**/
    }
    .con-bc{
        background:url(../images/center2.png) repeat-x 0 0;
        height: 40px;
        line-height: 40px;
        overflow: hidden;
    }

    HTML

    <div style="margin: 0 auto;  300px;">
        <div class="con-tl">
            <div class="con-tr">
                <div class="con-tc">
                    <div class="con-tc-title">这里是标题</div>
                </div>
            </div>
        </div>
        <div class="con-cl">
            <div class="con-cr">
                <div class="con-cc">
                    <div style=" 300px; height: 200px;">
                        这里显示内容
                    </div>
                </div>
            </div>
        </div>
        <div class="con-bl">
            <div class="con-br">
                <div class="con-bc"></div>
            </div>
        </div>
    
    </div>
  • 相关阅读:
    JDK源码那些事儿之LinkedBlockingQueue
    JDK源码那些事儿之并发ConcurrentHashMap上篇
    JDK源码那些事儿之ArrayBlockingQueue
    JDK源码那些事儿之HashMap.TreeNode
    mycat使用schema配置
    redis连接数高居不下,怎么破?。。。。这么破
    修改tomcat使用的的编码方式
    centos6.x下让redis以服务方式运行
    mycatrule
    HTML和XML中的转义字符
  • 原文地址:https://www.cnblogs.com/zjhs/p/3557229.html
Copyright © 2011-2022 走看看