zoukankan      html  css  js  c++  java
  • overflow:hidden可以将页面溢出内容隐藏起来

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Title</title>
    <meta lang="utf8">
    <div1>
    <style>
    .div1{
    background-color: #1ecc86;
    height:100px;
    overflow: auto;
    /*overflow: scroll;scroll有下拉滚动条*/

    }
    </style>
    </div1>
    </head>
    <body>
    <!--此时由于设置的高度有限,其余部分溢出,加入了overflow:auto,或者overflow:scroll(scroll有下拉滚动条)则会将溢出部分隐藏起来作为一个滚动条可以下拉查看-->
    <div class="div1">
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <h1>star</h1>
    <img src="1.jpg">
    </div>

    </body>
    </html>

    
    
  • 相关阅读:
    快速幂
    1112个人赛,最长回文串常见算法讨论
    11-05-sdust-个人赛赛后随想
    UVA 1149 Bin Packing
    UVa 1608,Non-boring sequences
    UVa 10954,Add All
    UVa 714,Copying Books
    Careercup
    Careercup
    Careercup
  • 原文地址:https://www.cnblogs.com/startl/p/12215893.html
Copyright © 2011-2022 走看看