zoukankan      html  css  js  c++  java
  • html float

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .pg-header{
                height: 38px;
                background: #dddddd;
                line-height: 38px;
            }
        </style>
    
    </head>
    <body style="margin:0 auto;">
        <div class="pg-header">
            <div style="float: left">收藏</div>
            <div style="float: right">
            <a>登录</a>
            <a>注册</a>
            </div>
        </div>
        <div style=" 300px;border: 1px solid red">
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style=" 96px;height: 30px;border: 1px solid green;float: left"></div>
            <div style="clear:both"></div>
    
        </div>
    </body>
    </html>
    View Code

    float:
    让标签浪起来:块级标签也可以堆叠
    父级标签管理子标签
    <div style="clear:both"></div>

    <body style="margin:0 auto;">   使页面头贴近边框
  • 相关阅读:
    大数据学习之路又之从小白到用sqoop导出数据
    大数据学习之路又之从csv文件到sql文件的操作过程
    大三第一次极限测试总结
    学习套模板
    今天
    大数据学习之路之ambari配置(四)
    大数据学习之路之ambari配置(三)
    数据清洗——地域维度
    Hive数据分析(五)
    Hive数据分析(四)
  • 原文地址:https://www.cnblogs.com/anhao-world/p/14056729.html
Copyright © 2011-2022 走看看