• 前端笔记1-6


    一.html布局

    <!DOCTYPE html>
    <html>
    <head>
    <title>html布局</title>
    <style>
    .head{
    background-color: black;
    color: white;
    font-family: "Times New Roman", Times, serif;
    text-align: center;
    padding: 5px;
    }
    .left{
    background-color: gray;
    height: 300px;
    100px;
    float: left;
    padding: 5px;
    }
    .right{
    350px;
    float: left;
    padding: 10px;
    }
    .footer{
    background-color: black;
    color: white;
    text-align: center;
    clear: both;
    padding: 5px;
    }


    </style>
    </head>
    <body>
    <div class="head">
    <h2>City Gallery</h2>
    </div>
    <div class="left">
    <p>London</p>
    <p>Paris</p>
    <p>Tokyo</p>
    </div>
    <div class="right">
    <h4>London</h4>
    <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
    <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
    </div>
    <div class="footer">
    <p>Copyright W3School.com.cn</p>
    </div>
    </body>
    </html>

    2.html使用表格布局

    <style>
    table.lamp {
        100%;
        border:1px solid #d4d4d4;
    }
    table.lamp th, td {
        padding:10px;
    }
    table.lamp td {
        40px;
    }
    </style>
    <style>
    table.lamp {
        100%;
        border:1px solid #d4d4d4;
    }
    table.lamp th, td {
        padding:10px;
    }
    table.lamp td {
        40px;
    }
    </style>

    3.使用html布局

    <body>
    
    <header>
    <h1>City Gallery</h1>
    </header>
    
    <nav>
    London<br>
    Paris<br>
    Tokyo<br>
    </nav>
    
    <section>
    <h1>London</h1>
    <p>
    London is the capital city of England. It is the most populous city in the United Kingdom,
    with a metropolitan area of over 13 million inhabitants.
    </p>
    <p>
    Standing on the River Thames, London has been a major settlement for two millennia,
    its history going back to its founding by the Romans, who named it Londinium.
    </p>
    </section>
    
    <footer>
    Copyright W3School.com.cn
    </footer>
    
    </body>
    css:
    <style>
    header {
        background-color:black;
        color:white;
        text-align:center;
        padding:5px; 
    }
    nav {
        line-height:30px;
        background-color:#eeeeee;
        height:300px;
        100px;
        float:left;
        padding:5px; 
    }
    section {
        350px;
        float:left;
        padding:10px; 
    }
    footer {
        background-color:black;
        color:white;
        clear:both;
        text-align:center;
        padding:5px; 
    }
  • 相关阅读:
    Oracle数据库导入(数据泵导)
    C# 根据WCF 的url动态调用WCF
    winform嵌套浏览器
    微信支付服务商模式 配置
    结对项目-增强型科学计算器
    vscode编辑远程linux系统下c/c++代码实现代码补全
    Linux development with C++ in Visual Studio
    用VS2015开发Linux程序详细教程-配置篇
    Go语言环境搭建详解(2020版)
    bat脚本实现后台运行cmd命令
  • 原文地址:https://www.cnblogs.com/jieyi/p/8313158.html
Copyright © 2020-2023  润新知