2023年6月14日

vue 中使用 rem 后元素最终大小的计算和转换?

摘要: 1. 如果项目引入了rem,那么默认的 html 元素的 font-size 大小会被设置为 html 元素.clientWidth / 10 + "px";如果不想使用默认设置,也可以自行修改。2. 1rem 将等于 html 的 font-size 的大小。3. 如果一个元素用px作为单位设置, 阅读全文

posted @ 2023-06-14 11:16 空明流光 阅读(367) 评论(0) 推荐(0) 编辑

html 中追踪 javascript 对样式的更改

摘要: 比如拦截 html 标签的 font-size 样式的更改: ... <body> <script> var observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { 阅读全文

posted @ 2023-06-14 10:41 空明流光 阅读(15) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示