WishMeLz

生活其实很有趣

分类 C3H5 下的文章

解决elementui table固定列的时候,滚动条被遮挡无法拖动的问题

1、修改el-table__body-wrapper样式的层级 /deep/ .el-table__body-wrapper{ z-index: 2 }解决滚动条被遮住的问题,同时含有合计也适用,缺点:就是表头和合计那部分有阴影,中间的部分没有阴影,不过不影响效果,问题不大。2、修改el-table__fixed样式.el-table { .el-table__fixed { height:auto !important; bottom:17px !important; } }就是设置...

浏览器内核判断

const userAgent = navigator.userAgent; const isWechat = /MicroMessenger/.test(userAgent); const isAlipay = /AlipayClient/.test(userAgent); const isChrome = /Chrome/.test(userAgent) && /Google Inc/.test(navigator.vendor); const isFirefox = /Firefox/.test(userAgent); con...

Flex 布局

https://github.com/lecepin/code-lab/tree/main/flex%20%E5%A4%87%E5%BF%98%E5%BD%95

CSS 一键黑白

-moz-filter:grayscale(100%); -ms-filter:grayscale(100%); -o-filter:grayscale(100%); filter:grayscale(100%); filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'...

移动端滑动

按下:touchstart 移动:touchmove 松开:touchend判断左右滑动: 按下记录X轴位置, 划动的过程中判断clientX大于还是小于即可判断左右滑动. 在滑动的过程中持续记录clientX的位置

思源黑体 Noto Sans SC

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:100,300,400,500,700,900">font-family: "Noto Sans SC";静态资源库 https://cdn.baomitu.com/index/fonts

移动端input输入时页面放大

<meta content="yes" name="apple-mobile-web-app-capable"> <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">

H5打电话发短信

<meta name="format-detection" content="telephone=yes"/> <a href="tel:13660007710">13660007710</a> <a href="sms:13660007710">13660007710</a>

根据元素宽度设定高度比例

要求:图片根据宽度设置高度。正方形.shopimg { width: 100%; height: 0; padding-bottom: 100%; // 这个就是高的比例 position: relative; } .shopimg-info { position: absolute; top:0; left: 0; bottom: 0; right: 0; } .shopimg img { width: 100%; height: 100%; }

CSS抖音特效

第一种 #h1{ font-family: "微软雅黑,sans-serif"; font-size: 48px; font-weight: 500; width: 400px; height: 100px; } #h1 { animation: uk-text-shadow-glitch .65s cubic-bezier(1, -2.91, 0, 3.79) 0s infinite norm...

静态页面实时刷新browser-sync

npm install -g browser-sync--files 路径是相对于运行该命令的项目(目录) browser-sync start --server --files "*" browser-sync start --server --files "css/*.css, *.html"

CSS

placeholderinput::placeholder{} uni-app <input placeholder-class="placeholder-class" type="text" v-model="val" placeholder="请输入"> 虚线 width: 1px; background-image: linear-gradient(to bottom, #4D5358 0%, #4D5358 80%, transpar...