摘要:
Element.getBoundingClientRect() 方法返回一个 DOMRect 对象,其提供了元素的大小及其相对于视口的位置。 参考: https://developer.mozilla.org/zh-CN/docs/Web/API/Element/getBoundingClientR 阅读全文
摘要:
// js 获取字符串中第二处出现的某个字符的索引 var st = 'Hello World!'; var index1 = st.indexOf( 'o' ); var index2 = st.indexOf( 'o', index1 + 1 ); alert( index2 ); // 结果是 阅读全文
摘要:
1.封装 webSocket.js 1 // websocket实例 2 let wsObj = null 3 4 // ws连接地址 5 let wsUrl = null 6 7 // 是否执行重连 true/不执行 ; false/执行 8 let lockReconnect = false 9 阅读全文
摘要:
css hover <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>鼠标事件</title> <style> .recommends-content-item{ width: 33%; height: 280px; margin 阅读全文
摘要:
老规矩直接上代码 $(this).animate({rotate:'180deg'}) 阅读全文
摘要:
.layui-form-select dl{ bottom: unset; } 阅读全文
摘要:
jQuery.parseHTML()方法 具体参考:https://api.jquery.com/jQuery.parseHTML/#jQuery-parseHTML1 阅读全文
摘要:
<script> let number = 18; let person = { name:"张三", sex:'女', }; console.log(person); Object.defineProperty(person,'age',{ // value:18, // enumerable:t 阅读全文
摘要:
.select { position: relative; width: 81px; height: 93px; margin: 0 auto; text-align: center; line-height: 93px; color: #4ABE84; background-color: #fff 阅读全文
摘要:
单页Web应用(single page web application,SPA),就是只有一张Web页面的应用,是加载单个HTML 页面并在用户与应用程序交互时动态更新该页面的Web应用程序。 单页面应用的优缺点(SPA) 单页面应用程序将所有的活动局限于一个Web页面中,在该Web页面初始化时加载 阅读全文