摘要: //获取select标签中option的value值 var $teacher=$('#teacher option:selected'); $teacher.val() 阅读全文
posted @ 2017-08-23 16:34 透明的月儿 阅读(4694) 评论(0) 推荐(0)
摘要: $(this) 选取当前 HTML 元素 $("p.intro") 选取 class 为 intro 的 <p> 元素 $("p:first") 选取第一个 <p> 元素 $('p:first-child') 选取属于 <p> 的父元素中第一个为 <p> 的元素 $("ul li:first") 选 阅读全文
posted @ 2017-08-23 13:11 透明的月儿 阅读(217) 评论(0) 推荐(0)
摘要: body, p, img, dl, dt, dd, ul, ol, h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; } body { position: relative; font: 12px/1 "Microsoft YaHei", Arial;} ul, ol { list-style: none; } img { border: 0 non... 阅读全文
posted @ 2017-08-22 17:33 透明的月儿 阅读(156) 评论(0) 推荐(0)
摘要: textarea{ resize: none; //去掉右下角线 outline: none; //去掉蓝光 } //给DIV限定宽度或高度,指定overflow样式为auto,会自动出现滚动条 阅读全文
posted @ 2017-08-22 17:31 透明的月儿 阅读(91) 评论(0) 推荐(0)
摘要: 首先安装node.js 和npm node -v npm -vnpm install -g less 安装完成后 多了node_modules文件 在控制台 lessc index.less > index.css 用webstrom自动监听less File>settings>Tools>File 阅读全文
posted @ 2017-08-22 10:58 透明的月儿 阅读(150) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-08-17 21:55 透明的月儿 阅读(374) 评论(0) 推荐(0)
摘要: <style> .jindu { width: 400px; height: 30px; background:blue; position: relative; } .zhi{ height: 30px; width: 30%; background: red; float: left; } .s 阅读全文
posted @ 2017-08-16 22:11 透明的月儿 阅读(141) 评论(0) 推荐(0)
摘要: var $bun=$('.bun');var $do=$('.do');$bun.click(function () { var value=$do.css('display') == 'none'?'block':'none'; $do.css('display',value);})或者$do.p 阅读全文
posted @ 2017-08-16 22:10 透明的月儿 阅读(126) 评论(0) 推荐(0)
摘要: .box{ display: table-cell; vertical-align: middle; text-align: center; } .box img{ width: 200px; height: 100px; } 只要是display: inline-block;的元素,都可以用类似img垂直居中。 .box{ width: 700... 阅读全文
posted @ 2017-08-16 15:35 透明的月儿 阅读(167) 评论(0) 推荐(0)
摘要: overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 阅读全文
posted @ 2017-08-16 15:19 透明的月儿 阅读(190) 评论(0) 推荐(0)