Melin's Blog

Latest posts

See all posts
  • Upload Images with a Paste: A Front-End JavaScript Guide
    Copy an image, press Ctrl+V or Command+V, and let the browser handle the rest. By zhangxinxu , adapted from the original article. Original publication note: Full reproduction re...
  • The Black Goat of the Drag-and-Drop Sacrifice: Understanding DataTransfer
    A front-end survival guide to drag data, drop effects, and the events that connect them. By zhangxinxu Adapted from the original article, with a companion demo using CustomEvent...
  • Smooth Page Scrolling with CSS `scroll-behavior` and JavaScript `scrollIntoView()`
    Turn abrupt jumps into gentle transitions—and give your interfaces a little personality. Adapted from zhangxinxu’s original article, with updated technical notes and excerpts fr...
  • How to Set and Get CSS Variables (`var()`) in HTML and JavaScript
    By zhangxinxu. Adapted from the original article. Changing a color in JavaScript does not require rewriting every CSS declaration that uses it. With CSS custom properties, you c...
  • The Document Picture-in-Picture API: Picture-in-Picture for Any Element
    Keep images, controls, and small interactive interfaces visible while users work elsewhere. Adapted from zhangxinxu’s original article, with practical examples from the supplied...
© 2026 • Melin
Press Esc or click anywhere to close