摘要: 用原生js,实现放大镜效果 css <style> *{ margin:0; padding:0; } #box{ width:350px; height:350px; border:1px solid #000; margin:100px; position:relative; } #big{ w 阅读全文
posted @ 2019-11-21 17:20 野鹤亦闲云 阅读(197) 评论(0) 推荐(0) 编辑
摘要: animate的手风琴效果 1 <style type="text/css"> 2 * { 3 margin: 0; 4 padding: 0; 5 } 6 ul{ 7 list-style: none; 8 } 9 10 .wrap { 11 width: 1020px; 12 margin: 1 阅读全文
posted @ 2019-11-21 17:06 野鹤亦闲云 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 轮播图淡入淡出效果 jquery css <style> *{margin: 0;padding: 0;} ul,ol{ list-style: none;} .wrapper{ width: 670px; height: 240px; margin: 100px auto; overflow: h 阅读全文
posted @ 2019-11-21 16:58 野鹤亦闲云 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 单行省略 display: block; overflow: hidden; white-space: nowrap; text-overflow:ellipsis; 多行省略 (数字即为自定义的行数)/(需要注意溢出隐藏的高度) overflow:hidden; text-overflow:ell 阅读全文
posted @ 2019-11-21 15:59 野鹤亦闲云 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 笔记+小案例 <style> .zi{ height:100px; width:100px; background:purple; margin:2px; line-height:100px; text-align: center; color:#fff; } .fu{ height:400px; 阅读全文
posted @ 2019-11-21 15:36 野鹤亦闲云 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 父元素高度自适应,子元素 float 后,造成父元素高度为0,称为高度塌陷问题。 推荐使用万能清除法解决。(给需要清除浮动的元素添加一个class名 clear) 万能清除法代码 父元素:after{ content: ""; height: 0; clear: both; overflow: hi 阅读全文
posted @ 2019-11-21 14:47 野鹤亦闲云 阅读(1666) 评论(0) 推荐(0) 编辑
摘要: 略有瑕疵,凑合能用,先当个笔记了,以后有更好的再换。 css 1 <style> 2 /*外层div*/ 3 .input-file-box{ 4 border: 1px solid gray; 5 width: 5rem; 6 height: 5rem; 7 margin-left:.5rem; 阅读全文
posted @ 2019-11-21 14:26 野鹤亦闲云 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 几个点击事件 1 <body> 2 <button>jq点击</button> 3 <input type="button" id="btn1" value="第一种"> 4 <input type="button" id="btn2" value="第二种"> 5 <input type="but 阅读全文
posted @ 2019-11-21 14:06 野鹤亦闲云 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 倒计时定时器 、 循环定时器 及定时器的清除 1 <body> 2 <div> 3 <input type="button" onclick="yi()" value="启动倒计时定时器"> 4 <input type="button" onclick="er()" value="启动循环定时器"> 阅读全文
posted @ 2019-11-21 13:45 野鹤亦闲云 阅读(1005) 评论(0) 推荐(0) 编辑
摘要: 一个简单的遮罩 1 <style> 2 #loading{ 3 display:none; 4 width:100%; 5 margin:0 auto; 6 position:fixed; 7 left:0; 8 top:0; 9 bottom: 0; 10 z-index: 111; 11 bac 阅读全文
posted @ 2019-11-21 11:45 野鹤亦闲云 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 加载完后执行 1 <script> 2 $(window).load(function(){ 3 // 等到整个window页面加载完成后才执行,两者之间的执行顺序是谁在上方谁优先执行 4 console.log("jquery 》window load" ); 5 }) 6 window.onlo 阅读全文
posted @ 2019-11-21 11:06 野鹤亦闲云 阅读(137) 评论(0) 推荐(0) 编辑