摘要: html部分 <input type="button" onclick="mymax(5,4,12)" value="按钮"/> <input type="button" onclick="mymin(5,4,12)" value="按钮"/> js部分 function mymax(x,y,z){ 阅读全文
posted @ 2017-06-14 13:59 阳光透过幸福 阅读(307) 评论(0) 推荐(0) 编辑
摘要: html部分 <div id='div1'> <div id="div2"></div> </div> css部分 div{ height:10px ; border-radius:5px; } #div1{ width:600px ; background: #333; } js部分 <scrip 阅读全文
posted @ 2017-06-12 10:52 阳光透过幸福 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 获取子节点:childNodes 在IE下是可以正常使用的 但是在FF包含了文本节点需要配合nodeType做个类型判断 1是元素节点 3是文本节点 也可以采用 children IE FF 获取第一个节点:firstChild || firstElementChild 获取最后一个节点:lastC 阅读全文
posted @ 2017-06-02 11:45 阳光透过幸福 阅读(88) 评论(0) 推荐(0) 编辑
摘要: function getStyle(obj,attr){ // 需要获取的元素 属性 if(obj.currentStyle){ return obj.currentStyle[attr]; }else{ return obj.getComputedStyle(obj,false)[attr]; } 阅读全文
posted @ 2017-06-01 16:45 阳光透过幸福 阅读(107) 评论(0) 推荐(0) 编辑
摘要: html部分 <div id="roll"> <a href="javascript:void(0)" class="prev">向左</a> <a href="javascript:void(0)" class="next">向右</a> <div id="scroll"> <ul> <li><i 阅读全文
posted @ 2017-05-31 15:14 阳光透过幸福 阅读(153) 评论(0) 推荐(0) 编辑
摘要: //星星的效果思路 1.获取需要修改的元素 ul li 跟p 布局 2.给li 加移入事件 更改提示框显示, 3.给li 加移出事件 更改提示框隐藏 4.给li加索引值代表自己的序号 5.在li移入时 添加循环从开始位置到选择的this.index位置 添加每个li的class 6.在li移出时 添 阅读全文
posted @ 2017-05-26 16:15 阳光透过幸福 阅读(402) 评论(0) 推荐(0) 编辑
摘要: html部分 <div id="div1">我是导航君</div> <div id="div2" style="display: none;"><i></i>我是导航君的小妹妹</div> css部分 div{ height:40px; line-height: 40px; text-align: 阅读全文
posted @ 2017-05-26 14:38 阳光透过幸福 阅读(567) 评论(0) 推荐(0) 编辑
摘要: html部分 <div id="clock"> </div> css部分 #clock{ width:600px ; text-align: center; margin:50px auto ; } span{ font-size: 32px; } js部分 <script type="text/j 阅读全文
posted @ 2017-05-26 11:21 阳光透过幸福 阅读(153) 评论(0) 推荐(0) 编辑
摘要: html部分 <div class='calendar'> <div class="tabBox" id='nav' > <ul> <li><h3>1</h3><p>jan</p></li> <li><h3>2</h3><p>jan</p></li> <li><h3>3</h3><p>jan</p> 阅读全文
posted @ 2017-05-26 11:02 阳光透过幸福 阅读(119) 评论(0) 推荐(0) 编辑
摘要: html部分 <div class="tab"> <div class="nav"> <ul> <li class="active">选项1<i></i></li> <li>选项2<i></i></li> <li>选项3<i></i></li> </ul> </div> <div class="co 阅读全文
posted @ 2017-05-25 16:47 阳光透过幸福 阅读(143) 评论(0) 推荐(0) 编辑