Code Tips

作者: 皮卡球ca | 来源:发表于2018-12-13 14:04 被阅读0次
    //List<string> arr 字符串数组 转逗号分隔字符串
    string strarr=Joiner.on(",").join(arr.ToArray());
    
    //CSS动态设置宽度 js设置可能存在过渡效果
    width:calc(100% - 215px)
    

    //取list 某一列

    List<string> list = p.Select(x => x.Age).Distinct().ToList();
    string.Join(",", list.ToArray());
    

    禁止换行 CSS
    强制换行

          1、word-break: break-all;       只对英文起作用,以字母作为换行依据。
          2、word-wrap: break-word;   只对英文起作用,以单词作为换行依据。
          3、white-space: pre-wrap;     只对中文起作用,强制换行。
    

    禁止换行

           white-space:nowrap;
           overflow:hidden;
           text-overflow:ellipsis;
    

    tab定位 返回问题

       window.history.pushState({}, "title", 'MyWorkListV2?tab=' + id);
    

    相关文章

      网友评论

          本文标题:Code Tips

          本文链接:https://www.haomeiwen.com/subject/sgovhqtx.html