zoukankan      html  css  js  c++  java
  • 2018.3.29 DIV位置调整代码

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <style type="text/css">
                /*固定在页面某一位置*/
                #a{
                     20px;
                    height: 20px;
                    background-color: black;
                    position: fixed;
                    bottom: 10px;
                    left: 10px;
                }
                /*相对于原位置所做的位移*/
                #b{
                     80px;
                    height: 80px;
                    background-color: red;
                    position: relative;
                    top: 60px;
                    left: 60px;
                }
                /*相对于上一级界面做的位移*/
                #c{
                     20px;
                    height: 20px;
                    background-color: #8A2BE2;
                    position: absolute;
                    bottom: 30px;
                    left: 30px;
                }
                /*浮动,向左*/
                #d{
                     20px;
                    height: 20px;
                    background-color: black;
                    float: left;
                }
                /*浮动,向右*/
                #e{
                     20px;
                    height: 20px;
                    background-color: green;
                    float: right;
                }
                /*清除上面div的格式影响*/
                .clear{
                    clear: both;
                }
            </style>
        </head>
        <body>
            <div id="a">    
            </div>
            <div id="b">    
            </div>
            <div id="c">    
            </div>
            <div class="clear"></div>
            <div id="d">    
            </div>
            <div id="e">    
            </div>
            
        </body>
    </html>

  • 相关阅读:
    ASP.NET MVC 1.0 + spring.net 1.2.0.20288 + NHibernate 2.0.1.4000整合笔记(三)——NHibernate配置
    ASP.NET MVC: 使用自定义 ModelBinder
    设计模式和重构的学习心得体验
    ASP.NET MVC 1.0 + spring.net 1.2.0.20288 + NHibernate 2.0.1.4000整合笔记(四)——整合asp.net mvc
    获取外键关联的实体对象
    Ado.net Entity Framework 中的多对多查询
    Oxite分析笔记之数据验证
    ASP.NET MVC 1.0 + spring.net 1.2.0.20288 + NHibernate 2.0.1.4000整合笔记(二)——spring.net配置
    WPF之依赖属性的继承
    WCF之传递较长字符串(参数)
  • 原文地址:https://www.cnblogs.com/0328dongbin/p/8672379.html
Copyright © 2011-2022 走看看