摘要:
自定义滚动条实现: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title 阅读全文
摘要:
html: <div class="hot-purchase"> <div class="title">热门团购</div> <dl class="item on"> <dt> <a href="" class="text-area">[text]</a> <a href="" class="tex 阅读全文
摘要:
$(document).ready(function () { let loginByPassword = true; //登录校验规则 let nameMapper = { phone: '手机号码', phoneCode: '手机验证码', account: "登录账号", password: 阅读全文
摘要:
1、多个元素处理同一个事件,有共同的逻辑 let loginForm = $('#loginForm'); loginForm.on('focusin', '#phone,#password,#account,#phoneCode', function (event) { let targetId 阅读全文
摘要:
function toggleToTopBtn(toTopBtn, scrollTop, clientHeight) { if (scrollTop > clientHeight) { toTopBtn.css('display', 'block') } else { toTopBtn.css('d 阅读全文
摘要:
html: <div class="sand-content fl"> <img src="images/sand_900x600c.jpg" alt="" id="sandPicture"> </div> css: .sand-content { position: relative; width 阅读全文
摘要:
宽高: javascript: offsetWidth jquery: outerWidth clientX 事件属性返回当事件被触发时鼠标指针相对于浏览器页面(或客户区)的水平坐标(垂直坐标)。 客户区指的是当前窗口。 显示出事件发生时鼠标指针的坐标。 clientX:当鼠标事件发生时(不管是on 阅读全文
摘要:
CSS Sprites一般只能使用到固定大小的盒子(box)里,这样才能够遮挡住不应该看到的部分。 【官方解释】 CSS雪碧图即CSS Sprite(精灵),在国内很多人叫css精灵,是一种网页图片应用处理方式。它允许你将一个页面涉及到的所有零星图片都包含到一张大图中去,这样一来,当访问该页面时,载 阅读全文
摘要:
html: <div class="consult-tab"> <a href="">咨询</a> <a href="">企业咨询</a> <a href="">咨询</a> <a href="">咨询</a> <a href="">咨询</a></div> css: .consult-tab { 阅读全文
摘要:
html: <body> <div class="login-wrap"> <div class="box-login"> <div class="login-form"> <dt class="login-tab"> <span class="actived">手机动态码登录</span> <sp 阅读全文