zoukankan      html  css  js  c++  java
  • HTML CSS 小技巧

    1分隔符

    使用css实现如图效果:

    scss代码:

    .hr {
      position: relative;
      width: 100%;
      height: 1px;
      background-color: #858585;
    
      &:before {
        content: "";
        position: absolute;
        width: 30px;
        height: 30px;
        left: 50%;
        top: -13px;
        margin-left: -15px;
        background-color: #FFFFFF;
      }
    
      &:after {
        content: "";
        position: absolute;
        width: 10px;
        height: 10px;
        border-radius: 5px;
        left: 50%;
        top: -4px;
        margin-left: -5px;
        background-color: #858585;
      }
    }

    html:

    <hr className="hr"/>

     

    2 多余文字省略

    IOS开发中,使用UILabel 容器装不下的文字会用...代替。

    在HTML中也可以使用完成相同的效果。

    css代码:

    divStyle{
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
  • 相关阅读:
    发布自己的包到Nuget上
    asp.net core 中的MD5加密
    asp.net core csrf
    KNN算法
    ios测试apk
    python多进程
    机顶盒 gettimeofday()获取毫秒溢出
    Kiggle:Digit Recognizer
    Kaggle:Titanic: Machine Learning from Disaster
    Python抓取微博评论
  • 原文地址:https://www.cnblogs.com/guolaomao/p/6553197.html
Copyright © 2011-2022 走看看