{"title":"scrollIntoView()\u3067\u306f\u4e0d\u53ef\u80fd\u306a\u4f4d\u7f6e\u3078\u3068\u8981\u7d20\u3092\u30b9\u30af\u30ed\u30fc\u30eb\u3055\u305b\u305f\u3044\u3068\u304d\u306fscrollBy()\u3092\u4f7f\u3046\u30c6\u30af\u304c\u3042\u308b","description":"\u30d6\u30e9\u30a6\u30b6\u4e0a\u306e\u8981\u7d20\u3092\u8996\u8a8d\u53ef\u80fd\u306a\u4f4d\u7f6e\u3078\u3068\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\u8a2d\u8a08\u306b\u3064\u3044\u3066\u8abf\u3079\u3066\u5b9f\u88c5\u3059\u308b\u6a5f\u4f1a\u304c\u3042\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 tl;dr const offsetPercentage = 25; const [parentRect, targetRect] = [ parent.getBoundingClientRect(), target.getBoundingClientRect(), ]; const offset = parentRect.height * offsetPercentage * 0.01; const diff = targetRect.top - parentRect.top - offset\u2026","categories":["\u6280\u8853","js","\u6280\u8853","js"],"version":"1.0","provider_url":"https://hatena.blog","height":"190","type":"rich","blog_title":"Lambda\u30ab\u30af\u30c6\u30eb","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/W/Windymelt/20240129/20240129213049.png","blog_url":"https://blog.3qe.us/","width":"100%","url":"https://blog.3qe.us/entry/2024/01/29/214328","author_url":"https://blog.hatena.ne.jp/Windymelt/","published":"2024-01-29 21:43:28","author_name":"Windymelt","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.3qe.us%2Fentry%2F2024%2F01%2F29%2F214328\" title=\"scrollIntoView()\u3067\u306f\u4e0d\u53ef\u80fd\u306a\u4f4d\u7f6e\u3078\u3068\u8981\u7d20\u3092\u30b9\u30af\u30ed\u30fc\u30eb\u3055\u305b\u305f\u3044\u3068\u304d\u306fscrollBy()\u3092\u4f7f\u3046\u30c6\u30af\u304c\u3042\u308b - Lambda\u30ab\u30af\u30c6\u30eb\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog"}