摘要: .box { display: flex; align-items: center; width: 200px; } .label { margin-right: 4px; background-color: #ccc; color: #fff; white-space: nowrap; } .de 阅读全文
posted @ 2024-05-25 18:03 胡姐姐 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 现状: 解决方案: 方案1): 将页面的所有字体强制改成微软雅黑。 * { font-family:"Microsoft Yahei" !important; } 方案2:) 页面放大到150%。(临时方案) 方案3): 使用其他浏览器(360浏览器、QQ浏览器、搜狗浏览器) 方案4):升级操作系统 阅读全文
posted @ 2024-05-24 10:56 胡姐姐 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 原生、 React都适用: const img = document.querySelector(".img"); /** 防止右键保存 */ img.addEventListener("contextmenu",(e)=>{ e.preventDefault(); }); /** 防止拖拽保存 * 阅读全文
posted @ 2024-04-26 11:03 胡姐姐 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 1、input、textarea自动回填默认值。 注:可通过属性 autocomplete="off" 来取消这个行为。 这个行为浏览器并没有暴漏出回调,a56爆大奖在线娱乐,无法知道这个行为的发生时机。 通过自测,发现window.onload事件里也取不到这个值(这个时候还没有回填),但是下一个宏任务可以取到这 阅读全文
posted @ 2024-02-28 16:43 胡姐姐 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 浏览器前进后退事件 阅读全文
posted @ 2024-01-24 16:29 胡姐姐 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 原文链接: https://perfectionkills.com/javascript-quiz-es6/ 1、 (function(x, f = () => x) { var x; var y = x; x = 2; return [x, y, f()]; })(1) 2、 (function( 阅读全文
posted @ 2024-01-16 11:18 胡姐姐 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 推荐一款基于fabricjs的图片编辑器(image-editor) hututuhu.github.io/tiny-image-editor/ 阅读全文
posted @ 2024-01-12 14:10 胡姐姐 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 设置: git config --global https.proxy http://127.0.0.1:1080 git config --global https.proxy https://127.0.0.1:1080 取消 git config --global --unset http.p 阅读全文
posted @ 2024-01-09 09:24 胡姐姐 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 获取URL除了域名的其他部分 (https://regex101.com/r/vK4rV7/1)[在线测试] const getPathFromUrl = (url: string = '') => { let regex = /(http[s]?:\/\/)?([^\\/\s]+\/)(.*)/; 阅读全文
posted @ 2024-01-03 16:45 胡姐姐 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 问题: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type No index signature with a parameter of type ' 阅读全文
posted @ 2024-01-03 09:43 胡姐姐 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 前情: 1、a56爆大奖在线娱乐有一个Editor组件,Editor里有一个子组件Download 目的:a56爆大奖在线娱乐想把Download组件里的download方法暴露出去,想让其他地方也可以触发download方法 2、由于a56爆大奖在线娱乐的Editor和Download组件都是函数组件,因此,需要使用useImperativeHand 阅读全文
posted @ 2023-12-27 17:51 胡姐姐 阅读(57) 评论(0) 推荐(0) 编辑
摘要: const paramStr = "page=1&size=20"; const actionUrl = "/export/XXX?" + paramStr; const exportForm = document.createElement('form'); exportForm.style.di 阅读全文
posted @ 2023-12-27 16:48 胡姐姐 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 问题: 像push代码到github,失败 解决方案: git config --global http.proxy http://127.0.0.1:1080 git config --global https.proxy http://127.0.0.1:1080 注:1080是代理端口,查一下 阅读全文
posted @ 2023-12-26 18:10 胡姐姐 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 问题:用git bash 打算初始化umi项目,结果报错 ![效果图](TTY initialization failed_1.png) 解决:换成CMD控制台来初始化 ![效果图](TTY initialization failed_2.png) 阅读全文
posted @ 2023-12-25 17:25 胡姐姐 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 文问题: xxx@gerrit.com:Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights a 阅读全文
posted @ 2023-12-04 18:12 胡姐姐 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 关键点: 1、当元素有横向滚动条时才执行 2、滚动时需要把页面的滚动事件禁掉,否则就会带着页面一起滚动 效果: 源码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" conte 阅读全文
posted @ 2023-11-23 14:26 胡姐姐 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 1、如果项目本身是LF格式的,拉下来就变成了CRLF格式的,可以使用以下命令。 git config --global core.autocrlf false 2、其他命令 // 提交时转换为LF,检出时转换为CRLF git config --global core.autocrlf true / 阅读全文
posted @ 2023-11-23 14:01 胡姐姐 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 正文: MDN正则参考文档:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Guide/Regular_Expressions a56爆大奖在线娱乐的正则笔记:https://www.yuque.com/docs/share/36f69420-115f- 阅读全文
posted @ 2023-11-23 14:01 胡姐姐 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 答:两种思路。 思路一、放弃表格自带的自适应功能,也就是内容不会自动垂直居中,高度也不会由内容伸展。 将div相对td绝对定位,div的边缘都紧贴td的边缘。 td { position:relative; } div { position:abolsute; top:0; right:0; bot 阅读全文
posted @ 2023-11-23 14:01 胡姐姐 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 效果: <div class="box"></div> .box { width: 200px; height: 200px; background: transparent; position: fixed; left: 50%; top: 50%; transform: translate(-5 阅读全文
posted @ 2023-11-21 15:58 胡姐姐 阅读(2) 评论(0) 推荐(1) 编辑