会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shine_lovely
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
6
下一页
2025年3月25日
grid布局
摘要: 对应子元素指定位置 /* 指定 two项目 的位置 */ /* 从第一根行网格线开始 */ /* 从第二根列网格线开始 */ /* 从第二根行网格线结束 */ /* 从第四根列网格线结束 */ .two { grid-area: 1 / 2 / 2 / 4; } /* 指定 four项目 的位置 *
阅读全文
posted @ 2025-03-25 14:25 shine_lovely
阅读(19)
评论(0)
推荐(0)
2024年11月5日
svg(d3)相关方法
摘要: 在 SVG 中获取文字元素宽度 因为 svg 中是一个一个元素组成的,和原生 DOM 元素差不多,所以就可使用获取普通元素宽度的API, getComputedTextLength 、getBoundingClientRect。 let $text = document.querySelector(
阅读全文
posted @ 2024-11-05 10:12 shine_lovely
阅读(61)
评论(0)
推荐(0)
2024年4月25日
vite打包,pdfjs-dist 报错import引入pdfjs-dist报错Top-level await is not available、No "GlobalWorkerOptions.workerSrc"等
摘要: Top-level await is not available in the configured target environment ("chrome87", "edge88", "es2020", "firefox78", "safari14" + 2 overrides) node_mod
阅读全文
posted @ 2024-04-25 17:52 shine_lovely
阅读(1417)
评论(0)
推荐(0)
2024年4月17日
git ignore 不生效
摘要: git rm -r --cached . git add . git commit -m "update gitignore"
阅读全文
posted @ 2024-04-17 11:53 shine_lovely
阅读(13)
评论(0)
推荐(0)
2023年4月7日
node-sass
摘要: npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
阅读全文
posted @ 2023-04-07 09:03 shine_lovely
阅读(48)
评论(0)
推荐(0)
2023年2月13日
vscode自定义主题配色
摘要: setting.json { "workbench.colorTheme": "Solarized Light", "window.zoomLevel": 1, // 目自定义的颜色 "editor.tokenColorCustomizations": { "comments": "#008000"
阅读全文
posted @ 2023-02-13 17:33 shine_lovely
阅读(299)
评论(0)
推荐(0)
2023年2月10日
Sass 报错 “@use rules must be written before any other rules”
摘要: 解决定义的scss变量在@use "sass:map";前面报错。 preprocessorOptions: { // 向全局sass样式传入共享的全局变量,注入 `scss` 的 `mixin` `variables` 到全局 scss: { additionalData: ` @import "
阅读全文
posted @ 2023-02-10 11:14 shine_lovely
阅读(5452)
评论(0)
推荐(0)
2022年12月9日
js 小技巧
摘要: 1. 无刷新去除 网址的参数 window.history.pushState({}, document.title, window.location.pathname); 2. Date对象 具体可以查阅 mdn new Date() // Wed Jul 20 2022 15:00:10 GMT
阅读全文
posted @ 2022-12-09 11:22 shine_lovely
阅读(33)
评论(0)
推荐(0)
2022年10月11日
密码强度的正则表达式(JavaScript)总结
摘要: 密码强度的正则表达式(JavaScript)总结 简言 本文给出了两个密码强度的正则表达式方案,一个简单,一个更复杂和安全。并分别给出了两个方案的解析和测试程序。一般大家可以根据自己的项目的实际需要,自行定义自己的密码正则约定。 前言 用户注册时,都会用到密码正则校验。要写出正确的正则表达式,先要定
阅读全文
posted @ 2022-10-11 09:44 shine_lovely
阅读(705)
评论(0)
推荐(0)
2022年8月11日
微信小程序知识点清单
摘要: 微信小程序 1. wxs 的简单应用 微信小程序的wxml模板语法不支持 数组的 slice 等方法,但实际开发过程中又必不可少,就可以新建wxs文件配合wxml来实现。 WXS(WeiXin Script)是小程序的一套脚本语言,结合 WXML,可以构建出页面的结构。 根目录下新建utils目录,
阅读全文
posted @ 2022-08-11 14:42 shine_lovely
阅读(357)
评论(0)
推荐(0)
微信小程序自定义tabbar
摘要: 微信小程序自定义tabbar 官方 custom-tab-bar 规则的tabbar(使用 cover-view等标签来覆盖原生的tabbar,但只能是规则的tabbar) app.json中配置 tabbar "tabBar": { "custom": true, "color": "#fff",
阅读全文
posted @ 2022-08-11 14:25 shine_lovely
阅读(3567)
评论(0)
推荐(0)
2022年8月5日
css实现精致的角标
摘要: css实现精致的角标 参考:视觉还原小技巧!CSS 实现角标效果 纯色角标 -> 有白色到透明渐变的角标 -> 更精致有微弱高光的角标 .ribbon1 { margin: 0 60px; font-size: 34px; line-height: 70px; color: #fff; text-a
阅读全文
posted @ 2022-08-05 12:17 shine_lovely
阅读(1964)
评论(0)
推荐(0)
2022年8月4日
css渐变 linear-gradient、repeating-linear-gradient
摘要: css渐变 linear-gradient、repeating-linear-gradient 参考:详解 linear-gradient 和 radial-gradient 的使用 定义 CSS linear-gradient() 函数用于创建一个表示两种或多种颜色线性渐变的图片。 linear-
阅读全文
posted @ 2022-08-04 17:58 shine_lovely
阅读(553)
评论(0)
推荐(0)
2022年8月3日
CSS filter滤镜属性、clip-path裁减属性
摘要: CSS filter滤镜属性、clip-path裁减属性 filter contrast(amount) 调整输入的对比度 amount<number>或amount <percentage> 小于100%会降低对比度,大于100%增加对比度。值0%将创建一个完全灰色的图像,而值将100%保持输入不
阅读全文
posted @ 2022-08-03 11:43 shine_lovely
阅读(141)
评论(0)
推荐(0)
2022年7月26日
react的bug记录
摘要: input在输入时,控制台出现 warning 意思是: Input 组件从一个非受控组件变成了一个受控组件。 造成这个问题的原因是:初始化时,Input 组件的value值为undefined。 所以,要解决该问题,我们只要在初始化时,Input 组件的value值为undefined时赋值一个空
阅读全文
posted @ 2022-07-26 14:28 shine_lovely
阅读(41)
评论(0)
推荐(0)
2022年7月5日
vuex的持久化
摘要: 安装 vuex-persist yarn add vuex-persist 应用 store.js import Vue from 'vue' import Vuex from 'vuex' import VuexPersistence from 'vuex-persist' Vue.use(Vue
阅读全文
posted @ 2022-07-05 11:05 shine_lovely
阅读(106)
评论(0)
推荐(0)
2022年6月23日
微信小程序
摘要: 图片顶到最上面 当前页面的json中配置: json "navigationStyle":"custom" checkbox样式修改 checkbox { /* 未选中时--样式更改 */ .wx-checkbox-input { border-radius: 50%; width: 30rpx;
阅读全文
posted @ 2022-06-23 11:18 shine_lovely
阅读(58)
评论(0)
推荐(0)
2022年6月16日
webstorm 使用file Watcher 编译scss文件为 wxss
摘要: 全局安装 sass npm install sass -g Arguments输入 $FileName$:$FileNameWithoutExtension$.wxss --no-source-map Output paths to refresh输入 $FileNameWithoutExtensi
阅读全文
posted @ 2022-06-16 19:52 shine_lovely
阅读(220)
评论(0)
推荐(0)
纯css实现文本展开收起
摘要: 使用 text-overflow: ellipsis .text { overflow: hidden; /* 将超出的部分隐藏掉 */ text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box
阅读全文
posted @ 2022-06-16 19:08 shine_lovely
阅读(679)
评论(0)
推荐(0)
2022年6月1日
js字符串- 每隔4个分割一下
摘要: 每隔4个加一个逗号 var t = '123456789abcdefg' var str = t.replace(/(.{4})/g, '$1,') // '1234,5678,9abc,defg'
阅读全文
posted @ 2022-06-01 14:37 shine_lovely
阅读(1295)
评论(0)
推荐(0)
1
2
3
4
5
6
下一页
公告