日常使用
number input 输入框 去除加减箭头
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none !imp
lhh|07/31/2024 14:47
日常使用
移动端 hover 事件导致的蓝色块
div { -webkit-tap-highlight-color: transparent; }
lhh|07/31/2024 14:47
日常使用
禁用事件
/* 禁止浏览器下拉刷新 */ body { overscroll-behavior-y: contain; } /* 禁止选择拖动图片 */ img { user-select: none;
lhh|07/31/2024 14:46
日常使用
隐藏滚动条
div::-webkit-scrollbar { display: none; width: 0px; height: 0px; }
lhh|07/31/2024 14:44
日常使用
增大点击区域
.btn { width: 20px; height: 20px; /* 这样点击区域就是 30 * 30 的了 */ padding: 5px; margin: -5px; }
lhh|07/31/2024 14:43
日常使用
grid
div { display: grid; /* 格子间距24px */ gap: 24px; /* 4列 2行 */ grid-template: "a a a a" "b b b
lhh|07/31/2024 14:42
日常使用
文字处理
多行显示/* 设置对齐模式 */ display: -webkit-box; -webkit-box-orient: vertical; text-overflow: ellipsis; -webki
lhh|07/31/2024 14:39
博主很懒,就这么多啦~~