codepen & js demos

codepen & js demos

Mutation Observer & customize resize event listener & demo

https://codepen.io/webgeeker/pen/YjrZgg

https://codepen.io/dashboard?type=search&opts_itemType=pen&opts_searchTerm=js&opts_order=newest&opts_depth=everything&opts_showForks=false&displayType=list&previewType=iframe&page=0


Mutation Observer

https://javascript.ruanyifeng.com/dom/mutationobserver.html

https://developer.mozilla.org/zh-CN/docs/Web/API/MutationObserver

// todo


resize & response width

https://developer.mozilla.org/en-US/docs/Web/API/Window/resize_event

codepen & js demos


const heightOutput = document.querySelector('#height');
const widthOutput = document.querySelector('#width'); function reportWindowSize() {
heightOutput.textContent = window.innerHeight;
widthOutput.textContent = window.innerWidth;
} window.onresize = reportWindowSize; // OR window.addEventListener('resize', reportWindowSize);

https://codepen.io/xgqfrms/pen/dyyWrWb?&editable=true



&copyxgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


上一篇:onethink 插件模板定位


下一篇:thinkphp 插件控制器