@supports (aspect-ratio: 1 / 1) {
aspect-ratio: 1.083;
}
@supports not (aspect-ratio: 1 / 1) {
height: 360px;
}
// grid 布局
display: grid;
gap: 8px;
grid-template-columns: 1.5fr 1fr 1fr;
// css滑动贴合
.parent {
overflow-y: auto;
scroll-snap-type: x mandatory;
// 隐藏滚动条
&::-webkit-scrollbar {
display: none;
}
.child {
scroll-snap-align: center;
scroll-snap-stop: always;
}
}
DOM 节点监听
const observer = new MutationObserver(callback);
observer.observe(targetNode, config);
observer.disconnect();
网页性能监听
// 创建实例
const observer = new PerformanceObserver(callback);
// 监听事件配置
observer.observe(config);
// 断开监听
observer.disconnect();
窗口可视监听
const intersectionObserver = new IntersectionObserver((entries) => {
// TODO
});
// start observing
intersectionObserver.observe(target);
https://juejin.cn/post/7354298118236717110
const canvas = window.OffscreenCanvas ? new OffscreenCanvas(width, height) : document.createElement('canvas');
const context = canvas.getContext('2d');
rust教程
https://www.ralfj.de/projects/rust-101/main.html
npm插件开发
https://juejin.cn/post/7399453056972652582
Figma 上手指南
https://juejin.cn/post/7270446183956332578
聊聊当今IT行业的乱象
https://juejin.cn/post/7352079468507594788
解读阿里巴巴集团的“大中台、小前台”组织战略
https://finance.sina.cn/fund/sm/2019-02-07/detail-ihqfskcp3555815.d.html?vt=4
IntersectionObserver(交叉观察器)
https://blog.csdn.net/fmk1023/article/details/122475012
桌面应用开发中的 Tauri 和 Electron
https://juejin.cn/post/7403267077651431464