• css实现条形图


     1 <!DOCTYPE html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     6     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     7     <title>Document</title>
     8     <style>
     9     body {
    10         margin:0 10px;
    11         padding:0;
    12     }
    13     #box {
    14         height: 300px;
    15          300px;
    16         border-left: 1px solid #333;
    17         border-bottom: 1px solid #ccc;
    18     }
    19     .rect1,.rect2,.rect3,.rect4,.rect5 {
    20         float: left;
    21          40px;
    22         margin-left: 15px;
    23     }
    24     .rect1 {
    25         height: 30%;
    26         margin-top: 70%; 
    27         background-color: #f00;
    28     }
    29     .rect2 {
    30         height: 80%;
    31         margin-top: 20%; 
    32         background-color: #ddd;
    33     }
    34     .rect3 {
    35         height: 70%;
    36         margin-top: 30%; 
    37         background-color: #0fd;
    38     }
    39     .rect4 {
    40         height: 60%;
    41         margin-top: 40%; 
    42         background-color: #ff0;
    43     }
    44     .rect5 {
    45         height: 90%;
    46         margin-top: 10%; 
    47         background-color: #234;
    48     }
    49     </style>
    50 </head>
    51 <body>
    52     <div id="box"> 
    53         <div class="rect1"></div>
    54         <div class="rect2"></div>
    55         <div class="rect3"></div>
    56         <div class="rect4"></div>
    57         <div class="rect5"></div>
    58     </div>
    59 </body>
    60 </html>
     1 <!DOCTYPE html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     6     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     7     <title>Document</title>
     8     <style>
     9     body {
    10         margin:0 10px;
    11         padding:0;
    12     }
    13     #box {
    14         justify-content: space-evenly;
    15         display: flex;
    16         align-items: flex-end; 
    17         height: 300px;
    18          300px;
    19         border-left: 1px solid #333;
    20         border-bottom: 1px solid #ccc;
    21     }
    22     .item {
    23         14%;
    24     }
    25     .rect1 {
    26         height: 30%;
    27         background:  #f00;
    28     }
    29     .rect2 {
    30         height: 80%;
    31         background: #ddd;
    32     }
    33     .rect3 {
    34         height: 70%;
    35         background: #0fd;
    36     }
    37     .rect4 {
    38         height: 60%;
    39         background: #ff0;
    40     }
    41     .rect5{
    42         height: 90%;
    43         background: #234;
    44     }
    45     </style>
    46 </head>
    47 <body>
    48     <div id="box">
    49         <span class="item rect1"></span>
    50         <span class="item rect2"></span>
    51         <span class="item rect3"></span>
    52         <span class="item rect4"></span>
    53         <span class="item rect5"></span>
    54     </div>
    55 </body>
    56 </html>
  • 相关阅读:
    redis在Linux的下载和安装
    redis 安装启动及设置密码windows
    Lambda学习---方法引用和其他基本应用
    Lambda学习---StreamApi使用
    java对象的访问定位
    java对象是如何创建的
    通过“减少内存”的方式解决内存溢出的问题
    springmvc配置中,mapper一直依赖注入不进去的问题记录
    为什么要简化代码书写
    压力测试工具
  • 原文地址:https://www.cnblogs.com/gaoxuerong123/p/9448286.html
Copyright © 2020-2023  润新知