严文彬
严文彬
```js //1. function colorPad(color) { var reg = /^#?([0-9a-f]{1,3}|[0-9a-f]{6})$/i; if (reg.test(color)) { return color.replace(reg, function (all, $1) { var hex = ''; if ($1.length === 3) { hex = $1.split('').map(function...
```js String.prototype.isGreater = function(len){ return this.length > len; } String.prototype.filterSPACE = function(){ return this.trim().replace(/\s+/g, ' '); } String.prototype.filterASCII = function(){ return this.replace(/[\x00-\xff]{2}/gi,"X"); } String.prototype.filterURI = function(){ return this.replace(/https?:\/\/[a-z\d\.\-\#\?]+/gi, 'http://t.cn/EiKzyBS'); }...
[demo](https://codepen.io/xboxyan/pen/VwYaGrM) ```js function telTrim(str){ var tel = str.replace(/[\s-]/g, ''); if (/^\d{11}$/.test(tel)) { return tel; } return str; } var form = document.getElementById('form'); var input = document.getElementById('input'); input.addEventListener('drop',function(ev){ ev.preventDefault(); var text...
用浮动实现还算比较简洁吧 ```css dl{ margin: 0; padding: 5px 10px; overflow: hidden; border: 1px solid #ccc; line-height: 2em; } dt{ float: left; clear: left; } dd{ float: right; clear: right; } ```
[demo](https://codepen.io/xboxyan/pen/LvQyeZ?editors=1100) ```html ``` 可以实现响应式自动更改每一行的个数,唯一的缺陷就是需要插入数量足够的`.fix`,当然`grid`布局配合媒体查询可能更好 ```css body{ margin: 0; } .content{ display: flex; flex-wrap: wrap; padding: 10px; } .box{ flex: 1; min-width: 100px; margin: 10px; cursor: pointer; } .box:hover,.box:active{ outline: 3px...
>  > 例如这种,我想给这个半圆的边框在选中这个优惠券的时候上色该怎么处理呢 @UmbraCi 可以看看这个解决方案 https://juejin.cn/post/6994625063127351303
可以去掉,但是这个绝对费不了CPU😂
这个可以去看他的官网,看有没有更新,以前最初使用这个组件的时候也是出现滚动的问题,现在好像没有了, 要是实在不放心,可以自己写一个,android用viewPagerAndroid组件,ios用scrollView组件就可以了,也很方便
好的,记下了
有会原生开发的就好做了,下载功能需要有后台服务。 这些都涉及到具体业务了,我写这个项目也只是为了练习`React Native` 😂