上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页
摘要: 本文地址: https://www.cnblogs.com/veinyin/p/14274289.html 1 CSS 避免过多样式嵌套(让浏览器一次就能找到) 避免使用 CSS 表达式(表达式每次都会执行) 使用绝对定位,让动画元素脱离文档流(避免影响其他元素) 避免使用 table 布局(tab 阅读全文
posted @ 2021-01-13 20:31 yuhui_yin 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 本文地址: https://www.cnblogs.com/veinyin/p/14274281.html 1 CommonJS 同步加载,在浏览器之外为 JS 构建模块生态系统,node.js 就是受它影响,也是同步的 // CommonJS const xx = require(xxx) exp 阅读全文
posted @ 2021-01-13 20:28 yuhui_yin 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 本文地址: https://www.cnblogs.com/veinyin/p/14274270.html 1 cookie cookie 通常由浏览器存储,请求时一起发送给服务器,服务器也可以发出带 cookie 的响应头,可以设置过期时间 使用: 会话管理:用户名、购物车信息、游戏得分、服务器要 阅读全文
posted @ 2021-01-13 20:25 yuhui_yin 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 本文地址:https://www.cnblogs.com/veinyin/p/14274258.html JS 优化原则:需要时才优化,要考虑可维护性 1 提升 JS 文件加载性能 将 CSS 文件放在 head 里,将 JS 文件放在 body 里 2 JS 变量和函数优化 尽量使用 ID 选择器 阅读全文
posted @ 2021-01-13 20:23 yuhui_yin 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 本文地址: https://www.cnblogs.com/veinyin/p/14274252.html 1 提升 CSS 渲染性能 谨慎使用 expensive 属性,如 nth-child、position: fixed 减少样式层级数,后代选择器不要深嵌套,从右向左匹配的 避免使用耗费 CP 阅读全文
posted @ 2021-01-13 20:22 yuhui_yin 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 本文地址: https://www.cnblogs.com/veinyin/p/14274243.html 1 精简 HTML 代码 减少 HTML 嵌套 减少 DOM 节点数 减少无语义代码(如额外元素清除浮动) 删除 HTTP 或 HTTPS,如果 URL 协议与页面协议一致,或都支持,可删除协 阅读全文
posted @ 2021-01-13 20:20 yuhui_yin 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 本文地址: https://www.cnblogs.com/veinyin/p/14274238.html 1 图片格式及应用场景 1. jpeg 栅格图,有损压缩图形格式,常用于存储和传输照片 适用:颜色丰富的照片、焦点图、banner图、结构不规则的图片 不适用:线条图、文字、图形图标,因为压缩 阅读全文
posted @ 2021-01-13 20:19 yuhui_yin 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 原文地址:https://www.cnblogs.com/veinyin/p/13541651.html 在学习 this 指向时,我们知道如果一个函数作为对象的方法执行时,this 指向这个对象 那么实现 call 可以参考这个思路 1. 在对象上添加函数 2. 执行对象方法 3. 删除为了改变 阅读全文
posted @ 2020-08-21 16:16 yuhui_yin 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 本文地址:https://www.cnblogs.com/veinyin/p/13455113.html 关于嵌套路由报 warning 的问题,官方文档其实在常见问题中已经给出了解决方法,查看这里 但是是 class component 的写法 export default class App e 阅读全文
posted @ 2020-08-07 21:08 yuhui_yin 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 本文地址:https://www.cnblogs.com/veinyin/p/13432003.html 本文中使用的 react-navigation 是 4.X 文档中示例 class HomeScreen extends React.Component { static navigationO 阅读全文
posted @ 2020-08-04 11:08 yuhui_yin 阅读(191) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页