【无标题】

H5 ios双击滚动

<script>

var agent = navigator.userAgent.toLowerCase(); //检测是否是ios

var iLastTouch = null; //缓存上⼀次tap的时间

if (agent.indexOf('iphone') >= 0 || agent.indexOf('ipad') >= 0) {

document.body.addEventListener('touchend', function (event) {

var iNow = new Date().getTime();

iLastTouch = iLastTouch || iNow + 1 /** 第⼀次时将iLastTouch设为当前时间+1 */ ; var delta = iNow - iLastTouch;

if (delta < 500 && delta > 0) {

event.preventDefault();

return false;

}

iLastTouch = iNow;

}, false);

}

</script>

table合并边框

border-collapse:collapse;

圆⾓部分overflow:hidden失效

transform: rotate(0deg);

新⼿机号正则表达式

/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[189])\d{8}$/

平滑滚动

html,body{

height: 100%;

scroll-behavior: smooth;

}

粘性定位

position: sticky;

top: 0;

left: 0

video隐藏全屏按钮

video::-webkit-media-controls-fullscreen-button {

display: none;

}

隐藏滚动条

::-webkit-scrollbar {

width: 0;

height: 0;

color: transparent;

}

⾃定义滚动条滑块

::-webkit-scrollbar-thumb {

width: 10rpx;

border-radius: 10rpx;

background-color: #CBCBCB;

}

蒙层

.mask-box {

position: fixed;

top: 0;

left: 0;

width: 100%;

height: 100%;

display: flex;

align-items: center;

justify-content: center;

background: rgba(0, 0, 0, .6);

}

渐变背景+渐变边框+圆⾓

border-radius: .36rem;

border: .06rem solid transparent;

background-clip: padding-box,border-box;

background-origin: padding-box,border-box;

background-image: linear-gradient(#fff,#fff),linear-gradient(#FFDB60,#FFEBB8,#FFBF36);去除全部空格

str.replace(/\s+/g, "");

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值