[MVC] DIV 布局

Posted 2727551894

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[MVC] DIV 布局相关的知识,希望对你有一定的参考价值。

[MVC] DIV 布局

<style>
    .top {
        background-color: red;
        height: 50px;
        top: 0px;
        position: absolute;
        left: 0;
        width: 100%;
    }

    .bottom {
        background-color: green;
        width: 100%;
        height: 100px;
        bottom: 0;
        position: absolute;
        left: 0;
    }

    .middle {
        background-color: yellow;
        position: absolute;
        top: 50px;
        left: 200px;
        bottom: 0;
        overflow-y: auto;
        margin-bottom:100px;
        right:200px;
    }

    .left {
        width: 200px;
        background-color: purple;
        position: absolute;
        left: 0;
        top: 50px;
        bottom: 0;
        margin-bottom: 100px;
        overflow-y: auto;
    }

    .right {
        width: 200px;
        background-color: grey;
        position: absolute;
        right: 0;
        top: 50px;
        bottom: 0;
        margin-bottom: 100px;
        overflow-y: auto;
    }

</style>


<div class="top">top</div>

<div class="left">
    left<br />
    @{
        for (int i = 0; i < 1000; i++)
        {
            @i<br />
        }
    }
</div>

<div class="middle">
    middle<br />
       @{
           for (int i = 0; i < 1000; i++)
           {
               @i
           }
           for (int i = 0; i < 1000; i++)
           {
               @i<br />
           }
       }
    
</div>

<div class="right">
    right<br />
    @{
        for (int i = 0; i < 1000; i++)
        {
            @i<br />
        }
    }
</div>

<div class="bottom">bottom</div>

 

以上是关于[MVC] DIV 布局的主要内容,如果未能解决你的问题,请参考以下文章

如何通过单击片段内的线性布局从片段类开始新活动?下面是我的代码,但这不起作用

Wordpress - 将代码片段包含到布局的选定部分的插件

有没有更聪明的方法将布局绑定到片段?

android片段表格布局

重新创建片段布局

片段布局不覆盖整个屏幕