显示与溢出 详细介绍

爱无路,恨无情。相思无缘,相爱无份。曾相识,恨离别。无风雨,无同舟,何结果。情远天边,心无挂碍,唯爱你独一。

显示与溢出的几种可能

css样式

        div {
            width: 200px;
            height: 200px;
            border: 1px solid #000;
        }

        .container {  
            overflow: auto;
            /* 
            内容溢出:内容显示的区域大于当前元素的区域
            * overflow属性设置内容溢出情况的处理方式
              * visible:(默认值)表示显示
              * hidden:表示溢出部分全部隐藏
              * scroll:提供一个滚动条(不管内容是否溢出)
              * auto:由浏览器决定(水平滚动 垂直滚动)
                *  如果内容没有溢出的情况,不做任何处理
                *  如果内容有溢出的情况,提供一个滚动条
             */
        }

        .child {
            width: 300px;
            height: 300px;
            background-color: tomato;
        }

        .text1 {
            overflow: visible;
        }

        .text2 {
            overflow: hidden;
        }

        .text3 {
            overflow: scroll;
        }

        .text4 {
            overflow: scroll;
        }

html内容

    <!-- 内容溢出:文本内容、图片、视频以及子级元素 -->
    <div class="container">
        Youth is not a time of life; it is a state of mind; it is not a matter of rosy cheeks, 
        red lips and supple knees; it is a matter of the will, a quality of the imagination, 
        a vigor of the emotions; it is the freshness of the deep springs of life.Youth means 
        a temperamental predominance of courage over timidity, of the appetite for adventure 
        over the love of ease. This often exists in a man of 60 more than a boy of 20. Nobody 
        grows old merely by a number of years. We grow old by deserting our ideals.

    </div>
     <div class="container"> 
        <img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3347358525,1745600819&fm=26&gp=0.jpg">
    </div> 
    <div class="container">
        <div class="child"></div>
    </div>

    <div class="text1">
        Whether 60 or 16, there is in every human being’s heart the lure of wonders, the 
        unfailing appetite for what’s next and the joy of the game of living. In the center 
        of your heart and my heart, there is a wireless station; so long as it receives messages 
        of beauty, hope, courage and power from man and from the infinite, so long as you are 
        young.When your aerials are down, and your spirit is covered with snows of cynicism and the 
        ice of pessimism, then you’ve grown old, even at 20; but as long as your aerials are up, to catch 
        waves of optimism, there’s hope you may die young at 80.

    </div>

    <div class="text2">
        Whether 60 or 16, there is in every human being’s heart the lure of wonders, the 
        unfailing appetite for what’s next and the joy of the game of living. In the center 
        of your heart and my heart, there is a wireless station; so long as it receives messages 
        of beauty, hope, courage and power from man and from the infinite, so long as you are 
        young.When your aerials are down, and your spirit is covered with snows of cynicism and the 
        ice of pessimism, then you’ve grown old, even at 20; but as long as your aerials are up, to catch 
        waves of optimism, there’s hope you may die young at 80.

    </div>

    <div class="text3">
        Whether 60 or 16, there is in every human being’s heart the lure of wonders, the 
        unfailing appetite for what’s next and the joy of the game of living. In the center 
        of your heart and my heart, there is a wireless station; so long as it receives messages 
        of beauty, hope, courage and power from man and from the infinite, so long as you are 
        young.When your aerials are down, and your spirit is covered with snows of cynicism and the 
        ice of pessimism, then you’ve grown old, even at 20; but as long as your aerials are up, to catch 
        waves of optimism, there’s hope you may die young at 80.

    </div>

    <div class="text4">
        Whether 60 or 16
    </div>

今天的我们

共同进步 共同努力 一起奋斗 感觉未来充满了可能

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

bliss小宝

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值