惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
量子位
GbyAI
GbyAI
腾讯CDC
T
Tailwind CSS Blog
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Docker
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
Jina AI
Jina AI
IT之家
IT之家
Y
Y Combinator Blog

博客园 - X龙

远程唤醒wol(Wake On Lan) 我的附件列表 github项目管理 js提交验证 web模拟慢网速环境 按钮提交事件处理(以下方法兼容ie,firefox,chrome) js 格式化日期 Win7下如何在任务栏显示操作中心的图标 清除右键图形属性 图形选项 .net软件工程师面试知识点 设置JqueryUI DatePicker默认语言为中文 asp.net mvc2升级到asp.net mvc3 pivot与unpivot用法 解决32位ie不能上网,64位ie能上网 seo robots.txt编写 xml xmlnamespace sql server 2005生成insert语句,同时完成多表(Bug:插入语句列列表最后一列列名后还带有,) input type=file显示及清空值 预防SQL注入攻击
div+css搭建系统页面框架
X龙 · 2012-07-06 · via 博客园 - X龙

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>

        <style type="text/css">
            *
            {
                margin:0;
                padding:0;
            }

            #mainTop
            {
                height:90px;
                overflow:hidden;
            }

            #bottomLeft
            {
                height:100%;
                width:15%;
                float:left;
                overflow:hidden;
                position:relative;
            }

            #bottomRight
            {
                height:100%;
                width:85%;
                float:left;
                overflow:hidden;
            }

            #split
            {
                width:10px;
                height:100%;
                background:black;
                position:absolute;
                right:0;
                top:0;
            }

            #leftContent
            {
                height:100%;        
                overflow:auto;
                margin-right:10px;  /* 宽度和split的宽度一致 */
            }

            #rightContent
            {
                height:100%:
                overflow:auto;
            }
        </style>
    </head>
    <body>
        <div>
            <div id="mainTop">c</div>
            <div id="mainBottom">
                <div id="bottomLeft">
                    <div id="split"></div>
                    <div id="leftContent">
                        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabe
                    </div>
                </div>
                <!-- 为什么在bottomRight还套一个rightContent:当对bottomRight设置margin或padding会将它占的位置加上
                margin或padding的宽度,导致溢出。在里面再套一个rightContent,让rightContent的宽度自动,当设置rightContent的margin或padding时,它占的整体位置不变,会将内容的宽度自动变小,
                margin或padding的宽度+width=rightContent的宽度
                -->
                <div id="bottomRight">
                    <div id="rightContent">b</div>
                </div>
                <div style="clear:both;"></div>
            </div>
        </div>
    </body>

    <script type="text/javascript">            
        var docHeight = document.documentElement.clientHeight;
        var mainBottom = document.getElementById("mainBottom");

        // 90:是mainTop的高度
        mainBottom.style.height = (docHeight - 90).toString() + "px";

        document.getElementById("bottomLeft").onscroll = function()    {
            document.getElementById("split").style.position = "absolute";
            document.getElementById("split").style.right = "2px";
        };
    </script>
</html>