zoukankan      html  css  js  c++  java
  • margin的负值使用技巧

     1 <!DOCTYPE html>
     2 <html>
     3     <head>
     4         <meta charset="utf-8">
     5         <title></title>
     6         <style type="text/css">
     7         *{
     8             margin: 0;
     9             padding: 0;
    10         }
    11         .box{
    12             width: 1000px;
    13             margin: 50px auto;
    14             overflow: hidden;
    15         }
    16         .left,.right{
    17             float: left;
    18             width: 500px;
    19             font-size: 24px;
    20             color: #fff;
    21         }
    22         .left{
    23             height: 500px;
    24             background-color: red;
    25         }
    26         .right{
    27             height: 500px;
    28             background-color: green;
    29             /* margin-left: -1000px; */
    30         }
    31         </style>
    32     </head>
    33     <body>
    34         <div class="box">
    35         <div class="left">北京北京北京北京北京北京北京北京北京北京</div>
    36         <div class="right">上海上海上海上海上海上海上海上海上海上海</div>
    37         </div>
    38     </body>
    39 </html>
  • 相关阅读:
    对象的方法
    uni-app运行
    flex取值
    阿里矢量库使用
    移动端vue项目模板
    微信分享--转载
    页面流动条
    uni-app打包
    Hibernate~DAO
    EL表达式
  • 原文地址:https://www.cnblogs.com/webaction/p/13885683.html
Copyright © 2011-2022 走看看