Posts
All the articles I've posted.
前端 JS 生成好看的背景
Published: at 02:58 AM使用 JavaScript 和 CSS 代码生成漂亮的动态背景效果。代码包含颜色数组,随机生成不同大小和位置的彩色方块,并添加悬停动画和阴影效果,最终实现一个好看的背景。
iOS Safari 下 CSS 100vh 高度问题及解决方案
Published: at 10:23 AMiOS Safari 浏览器存在一个已知问题:使用 CSS 中的 `100vh` 属性时,高度往往会比屏幕实际高度多出一小部分。本文讨论了这个问题的成因,并提供了解决方案,使用`@supports (-webkit-touch-callout: none) { height: -webkit-fill-available; }`来修正 iOS Safari 下 `100vh` 不准确的问题。
Vue Data Resetting Techniques
Published: at 05:31 PMThis article explores different methods for resetting data in Vue.js applications, including resetting the entire data object or specific properties using `this.$data` and `this.$options.data()`. Learn how to efficiently restore your component's data to its initial state.
JS 解构赋值
Published: at 05:20 PM本文记录了 JavaScript 解构赋值中的一些细节,特别是关于默认值的使用,以及 `null`值和`undefined` 值在解构赋值中的不同行为。文章通过示例代码演示了如何正确使用解构赋值,以及如何避免一些常见的错误。