- 博客(7)
- 收藏
- 关注
转载 e.target与事件委托简例(原生和jQuery的区别)
target定义(英译:目标,目的): target 事件属性可返回事件的目标节点(触发该事件的节点),如生成事件的元素、文档或窗口。语法: event.target event.target.nodeName //获取事件触发元素标签name(li,p...) event.target.id //获取事件触发元素id...
2019-09-04 16:31:00
304
转载 jquery 往上滚动的时显示,上下滚动执行的js
$(document).on("mousewheel DOMMouseScroll", function (e) { var delta = (e.originalEvent.wheelDelta && (e.originalEvent.wheelDelta > 0 ? 1 : -1)) || // chrome & ie ...
2019-02-18 17:12:00
139
转载 使用css把placeholder值渐渐消失
复制过去就行了,不要问我为什么,就两个字爽快input:focus {outline: none; } input:focus::-webkit-input-placeholder {text-indent: 100%; opacity: 0; -webkit-transition: .4s; transition: .4s; } input:focus::-moz-placeholde...
2019-02-15 15:14:00
205
转载 jquery a标签的锚点点击的时候页面上缓慢滚动
a标签增加一个名字触发效果:$(".transition").click(function(){ if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { ...
2019-02-15 15:10:00
649
转载 使PC端网页宽度自适应手机屏幕大小
有时候我们会纠结PC页面在手机页面上无法正常显示,超出屏幕,有些内容看不到,现在又了下面的代码,可以做到自适应手机端的屏幕宽度:在html的<head>中增加一个meta标签:<meta name=”viewport” content=”width=device-width, initial-scale=1.0, minimum-scale=0.5, maxim...
2018-05-30 21:57:00
272
转载 图片左边点击,右边大图展示
css样式:*{ margin: 0; padding: 0; text-decoration: none; list-style: none;}html,body{ width: 100%; height: 100%;}img{ width: 100%; height: 100%; display: block;}.left{ width: 30%; float: left; back...
2018-05-22 19:39:00
510
转载 css定位 双飞翼
<!doctype html><html><head><meta charset="utf-8"><title>双飞翼</title><style>.top{ position:fixed; height:100px; background-color:#F09; left:10px; right:10p...
2017-11-14 14:41:00
66
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人