- 博客(6)
- 收藏
- 关注
原创 使用jqueryUI实现拖动标签互换位置
使用jqueryUI实现拖动标签互换位置 <div class="DIY"> <span>1</span> <span>2</span> <span>3</span> </div> <script type="text/javascript" src="js/sa...
2019-07-04 11:50:14
628
原创 刷新页面时,使选项卡停留在当前页
刷新页面时,使选项卡停留在当前页 <style> .active{ color:red; } </style> <div class="scroll_title" id="myTab1"> <span class="title" id="mytab_01" onclick="nTabs('mytab_01');location.href='...
2019-06-28 14:08:02
494
原创 js动态添加的元素不能绑定事件的解决方案
js动态添加的元素不能绑定事件的解决方案 // An highlighted block var foo = 'bar'; $("父元素").on('click', '子元素', function(){})
2019-06-27 17:26:34
452
原创 iphone手机键盘收起,页面不下来
iphone手机键盘收起,页面不下来 <script> $('input,textarea').on('blur',function(){ window.scroll(0,0); }); $('select').on('change',function(){ window.scroll(0,0); }); </script> ...
2019-05-21 18:01:51
1906
原创 正方形,宽使用百分比时高怎么设置
元素设置为正方形,宽使用百分比时高怎么设置 css方法 body,html{ width: 100%; height: 100%; } .box{ width: 20%; height: 0; padding-top: 20%; background-color: aqua; } js方法 $(function(){ //获取div的宽度值 ...
2019-05-21 17:52:11
445
原创 div 盒子居中方法
1. margin 方法 .div{ width: 500px; height: 500px; border: 1px solid red; /*居中*/ position: relative; } .box{ width: 100px; height: 100px; background: #999999; /*居中*/ position: absolute; to...
2019-05-21 16:43:28
6376
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅