此文章修改自http://yanhaijing.com/jquery/2013/12/05/writing-better-jquery-code/,截取了其中认为很有用的部分。1.缓存变量,DOM遍历是昂贵的,所以尽量将会重用的元素缓存。// 糟糕h = $('#element').height()...
分类:
Web程序 时间:
2014-11-24 20:44:55
阅读次数:
184
div拖动代码,在用此代码之前,你可能需要将你需要拖动的元素style设置position: absolute;#textareaSavaDiv{ position: absolute; right:50px; width:300px; height:300px;}html...
分类:
编程语言 时间:
2014-11-24 19:09:21
阅读次数:
238
创建一个空白窗体,复制以下代码即可 public partial class Form1 : Form { int width, height; decimal percent = 0m; string path = "C:\\Users\\Pu...
本质是通过复用控件达到性能优化。
1、通过
被复用控件:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:o...
分类:
移动开发 时间:
2014-11-24 15:29:28
阅读次数:
232
弹出窗口前一般都需要在本页面上增加一层蒙板覆盖整个页面/*蒙版scss*/.mask{ background: rgba(0,0,0,0.5); width: 100%; height: 100%; position: fixed; left: 0; top: 0; z-index: 4; disp...
分类:
其他好文 时间:
2014-11-24 15:02:12
阅读次数:
195
1、统一设置PCB中注释字体的大小:在PCB编辑状态,鼠标指向任一需要修改的丝印字符,右键选择find similar object,这时会弹出的对话框中将代表元件字符的选项右边对应选项改为same,点击OK,会出现inspector面板,将width和height改为自己需要的字粗和高度。2、切换...
分类:
其他好文 时间:
2014-11-24 14:58:29
阅读次数:
266
完成效果:需求:根据数据配置来展示的类似GridView。设计配置项:datasource:[{},{}], //数据源绑定 json格式width:null, //默认不设置 自动获取父节点的宽度height:200, //列表高度pageM...
分类:
Web程序 时间:
2014-11-24 10:02:10
阅读次数:
184
demo #parent { background: red; width: 200px; height: 200px;}#child { background: green; width: 50px; height: 50px; ...
分类:
Web程序 时间:
2014-11-23 21:36:28
阅读次数:
216