自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 自定义滚动条(2)

自定义滚动条(2)*{margin: 0;padding: 0;}#div1{height: 20px; width: 20px; position: absolute; background: greenyellow;}#div2{height: 20px; width: 500px; position: relative;border: 1px black solid; mar

2017-02-21 15:32:26 267

原创 自定义滚动条(1)

自定义滚动条(1)*{margin: 0;padding: 0;}#div1{height: 20px; width: 20px; position: absolute; background: greenyellow;}#div2{height: 20px; width: 500px; position: relative;border: 1px black solid; mar

2017-02-21 15:31:53 207

原创 带框拖拽

带框拖拽*{margin: 0; padding: 0;}#div1{height: 100px; width: 100px; position: absolute; background: greenyellow;}#Box{border: 1px dashed black; position: absolute;}            var oDis

2017-02-21 02:51:53 283

原创 绝对定位和相对定位的区别

DIV CSS中的绝对定位和相对定位的区别,我从网上看了好多,都没个详细的说法,其实也不用搞到那么复杂的。先说相对定位:跟它的名一样,相对嘛,要有一个参照物,但这个参照不是别的,是它自己呢,也就是说没设相对定位的位置,那你会问了,设没设都在那个位置为什么要设呢,因为只有设置了才能使 TOP,LEFT这些生效,也就是设了才能相对自己原来的位置偏移,原来的位置保留着,偏移后会把其它的层遮罩住。再说绝对

2017-02-20 17:39:19 782 1

转载 Ecs6扫盲

1. let、const 和 block 作用域let 允许创建块级作用域,ES6 推荐在函数中使用 let 定义变量,而非 var:var a = 2;{ let a = 3; console.log(a); // 3}console.log(a); // 2运行代码同样在块级作用域有效的另一个变量声明方式是 const,它可以声明一个常量。ES6 中,

2017-02-20 00:12:36 3797 1

原创 靠谱拖拽

靠谱拖拽#div1{height: 100px; width: 100px; position: absolute; background: greenyellow;}            var oDisx=0;            var oDisy=0;var oDiv=document.getElementById('div1');oDiv.

2017-02-19 23:31:03 234

原创 自定义菜单|默认行为(事件)

自定义菜单|默认行为(事件)*{margin: 0;padding: 0;list-style: none;}#div1{height: 90px;background: #ccc;position: absolute;border: 1px black solid;display: none;}body{height: 2000px;}菜单开机关机

2017-02-19 14:21:59 510

原创 回车提交功能

回车提交功能                    #div1{height: 100px; width: 200px; border: 1px solid;}            #ul1 li{list-style: none;}                                                            

2017-02-18 23:26:23 232

转载 var oEvent=ev||event;何时使用

var oEvent=ev||event;这一句这么写是要兼容各个浏览器,在FireFox浏览器中,事件绑定的函数要获取到事件本身,需要从函数中传入,而IE等浏览器则可以直接使用event或者window.event得到事件本身。这一句的用途:需要获取和事件相关的信息时使用。如:获取键盘按下或弹起的按键获取鼠标的位置坐标获取出发改事件

2017-02-18 02:29:55 2884

原创 一串跟随鼠标的div

一串跟随鼠标的divdiv{height: 100px; width:150px; position: absolute;}img{height: 100px; width:150px;}function g

2017-02-18 01:42:34 336

原创 仿新浪微博消息发布功能js代码

仿新浪微博消息发布功能*{margin: 0; padding: 0;}#div1{width: 400px; height: 400px; border: 1px solid; margin:10px auto; position: relative;overflow: hidden;}#ul1 li{border-bottom: 1px #999 dashed; padding

2017-02-17 15:55:49 3358 1

原创 仿淘宝幻灯片上下滑动效果

仿淘宝幻灯片上下滑动效果        *{margin: 0;padding: 0;}        body{background: grey;}        #play{width:700px; height:300px;position: relative; margin:120px auto;overflow:hidden;}.active{background:y

2017-02-16 02:41:21 875

原创 js完美运动框架最终版

function getstyle(obj,name)   {if(obj.currentStyle){return obj.currentStyle;}else{return getComputedStyle(obj,false)[name];}   }            function move(obj,json,fnEnd){clea

2017-02-15 19:08:44 680 2

原创 组合淡入淡出

组合淡入淡出div{width: 200px; height: 200px; float: left; background: red; margin: 10px;filter: alpha(opacity:30); opacity:0.3;}   var timer=null;var oDiv=document.getElementsByTag

2017-02-06 21:11:49 169

原创 多物体运动框架

多物体运动框架div{width: 100px; height: 50px; background: greenyellow; margin: 10px;}   var timer=null;var aDiv=document.getElementsByTagName('div');function move(target,obj){clea

2017-02-06 21:10:58 231

原创 淡入淡出

运动二(淡入淡出)#div1{width: 200px; height: 200px; background: greenyellow; filter: alpha(opacity:30); opacity:0.3;}   var alpha=30;var oDiv1=document.getElementById('div1');var timer=n

2017-02-05 00:07:46 236

原创 内部分享栏

运动一(分享栏)#div1{width: 150px; height: 200px; background: green; position: absolute; left: -150px;}#div1 span{position:absolute; width: 20px; height: 60px; background: blue; right: -20px; top:

2017-02-05 00:06:27 622

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除