zoukankan      html  css  js  c++  java
  • 浮动

    浮动

    通过float属性,让块级标签同行显示。

    比如:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <style>
    *{
    padding: 0px;
    margin: 0px;
    }
    div{
    background-color: yellow;
    height: 60px;
    }
    ul{
    list-style: none;
    color: red;
    font-size: 30px;
    }
    li{
    float: left;
    160px;
    line-height: 60px;
    }
    li:first-child{
    margin-left: 20px;
    }
    </style>
    <title>列表导航栏</title>
    </head>
    <body>
    <div>
    <ul>
    <li>购物车</li>
    <li>帮助中心</li>
    <li>加入收藏</li>
    <li>设置首页</li>
    <li>登录</li>
    <li>注册</li>
    </ul>
    </div>
    </body>
    </html>

    运行结果:

    
    
  • 相关阅读:
    MySQL-基础知识整理
    设计模式-适配器模式
    MySQL
    MySQL-5.7 填坑
    MySQL
    Oracle
    SQL 注入
    Apache JMeter
    AppScan
    DNS 搜索
  • 原文地址:https://www.cnblogs.com/zw0214/p/7271888.html
Copyright © 2011-2022 走看看