上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: 父元素高度自适应,子元素 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) 编辑
摘要: css 默认样式重置 1 @charset "utf-8"; 2 *{margin:0;padding:0;} 3 img {border:none; display:block;} 4 em,i{ font-style:normal;} 5 body, div, dl, dt, dd, ul, o 阅读全文
posted @ 2019-11-20 17:02 野鹤亦闲云 阅读(707) 评论(0) 推荐(1) 编辑
摘要: 此小案例适合数据较少的类似三级联动的小效果,省市区三级联动参见 https://www.cnblogs.com/xiaoyaolang/p/11896484.html <body> <select name="" id="prov"> <option value="">请选择省</option> < 阅读全文
posted @ 2019-11-20 11:54 野鹤亦闲云 阅读(475) 评论(0) 推荐(3) 编辑
摘要: 偶遇大神三级联动,顿觉新颖,借鉴之。 展示图 html <style> .box{width:80%; margin:20px auto} .box p{line-height:24px} </style> <body> <div class="box"> <p>三级联动</p> <p>没有数据的s 阅读全文
posted @ 2019-11-20 11:16 野鹤亦闲云 阅读(803) 评论(0) 推荐(1) 编辑
摘要: jquery attr 1 <script> 2 3 // 获取class 名 4 $(".box").attr("class") 5 6 // 修改或添加class名,有(用class获取)就是修改,没有(用id获取)就是添加 7 $("#box").attr("class","men") 8 9 阅读全文
posted @ 2019-11-20 10:04 野鹤亦闲云 阅读(1088) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页