SQL优化的几点见解
字段是否走了索引,走不走索引的效率差了几百倍 批量操作 连接的表不要过多 ==避免使用 select== 小表驱动大表 使用 limit 使用 union all 代替 union 口诀:in 小,exists 大,in 先内后外,exists 先外后内
串口助手接收区那里显示的打印很奇怪
把接收模式改成文本模式即可
CSS 实现形状
1.正方形 #square { width: 100px; height: 100px; background: red; } 2.长方形 #rectangle { width: 200px; height: 100px; background: red; } 3.圆形 #circle { width: 100px; height: 100px; background: red; border-radius: 50% } 4.椭圆形 #oval { width: 200px; height: 100px; background: red; border-radius: 100px / 50px; } 5.上三角 #triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid tra...
JavaScript 中的假值
""(空字符串) NaN
一些常见浏览器响应码的意思
400 - 前端传过来的参数错误,可能是数据格式,可能是写的名字映射不上,反正就是打不成一个对象发过来,一定要和后端的数据包格式要对上(错了好多次400这里) 401 - 权限不足 500 - 后台系统有错误,后端哪里的代码抛异常了 600 - 其他业务异常 200 - 成功
CSS书写规范
1.位置属性(position, top, right, z-index, display, float等) 2.大小(width, height, padding, margin) 3.文字系列(font, line-height, letter-spacing, color- text-align等) 4.背景(background, border等) 5.其他(animation, transition等) CSS书写规范 使用CSS缩写属性 CSS有些属性是可以缩写的,比如padding,margin,font等等,这样精简代码同时又能提高用户的阅读体验。 去掉小数点前的“0” 简写命名 很多用户都喜欢简写类名,但前提是要让人看懂你的命名才能简写哦! 16进制颜色代码缩写 有些颜色代码是可以缩写的,我们就尽量缩写吧,提高用户体验为主。 连字符CSS选择器命名规范 1.长名称或词组可以使用中横线来为选择器命名。 2.不建议使用“_”下划线来命名CSS选择器,为什么呢? 输入的时候少按一个shift键; 浏览器兼容问题 (比如使用_tips的选择器命名,在IE6是...
前端学习
before和after的理解 其实就是一个行内元素,只不过一个在元素前触发,一个后触发罢了 选择器 >:父子 +:兄弟 section [class^=“box”]:section元素中所有以box为前缀的元素 通配样式 *{ margin: 0; padding:0; font-size: 14px; font-family: Arial, Helvetica, sans-serif; box-sizing: border-box; list-style: none; /*隐藏无序列表的表头 */ } calc函数使用 width: calc(100% / 2 - 5px); 文字超出容器宽度自动换行 overflow-wrap: break-word; 文字超出内容省略显示 text-overflow: ellipsis; calc函数使用 width: calc(100% / 2 - 5px); 隐藏元素 visibility: hidden; /* 隐藏元素 */ overflow: h...
扑克花色
红心 <div id="heart"></div> #heart { position: relative; width: 100px; height: 90px; } #heart:before, #heart:after { position: absolute; content: ""; left: 50px; top: 0; width: 50px; height: 80px; background: red; border-radius: 50px 50px 0 0; transform: rotate(-45deg); transform-origin: 0 100%; } #heart:after { left: 0; t...
