![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
css
A_linyuan
这个作者很懒,什么都没留下…
展开
-
js正则 校验输入的颜色值是否合法【rgb(a),hsl(a),hsl】
function CheckIsColor(bgVal) { let type=''; if(/^rgb\(/.test(bgVal)){ //如果是rgb开头,200-249,250-255,0-199 type = "^[rR][gG][Bb][\(]([\\s]*(2[0-4][0-9]|25[0-5]|[01]?[0-9][0-9]?)[\\s]*,){2}[\\s]*(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)[\\s]*[\)]原创 2020-08-24 00:54:21 · 4916 阅读 · 0 评论 -
css换行:white-space,word-break,word-wrap
white-space 属性white-space属性指定元素内的空白怎样处理。值描述normal 默认空白会被浏览器忽略。pre空白会被浏览器保留。其行为方式类似 HTML 中的 标签。pre-wrap保留空白符序列,但是正常地进行换行。pre-line合并空白符序列,但是保留换行符。nowrap文本不会换行,文本会在在同一行上继续,直到遇到 标签为止。inherit规定应该从父元素继承 white-space 属性的值。word原创 2020-07-31 19:02:30 · 248 阅读 · 1 评论