自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(46)
  • 资源 (2)
  • 收藏
  • 关注

原创 css3编写导航栏

Document *{margin: 0;padding:0;} nav>ul>li>a{color: #ccc;text-decoration: none;} nav>ul{ width: 80%; height: 50px; background: -webkit-linear-gradient(top,#292929,#252525); margin: 0 a

2015-11-17 11:25:08 556

原创 ps快捷键对应的英文字母缩写

2015-11-14 13:35:07 3130

原创 小三角

Document *{margin: 0;padding: 0} .box1{ border-width: 10px; border-style: solid; border-color: red transparent transparent transparent; width: 0; height: 0; } .box1:hover{ transform:

2015-11-13 14:09:33 315

原创 jquery编写弹窗

Document .popup{width: 300px; height: 300px; position: absolute; border: 1px solid red; } #div1{ position: absolute; top:0; right: 0; } $(function(){ $('#btn1').cl

2015-11-12 11:30:17 414

原创 jquery写拖拽

详情参考:妙味课堂原创JavaScript视频教程——事件详解3 Document $(function(){ var disX=0; var disY=0; $('div').mousedown(function(ev){ disX=ev.pageX-$(this).offset().left; disY=ev.pageY-$(this).offset

2015-11-11 22:00:49 297

原创 原生js写tab

Document window.onload=function(){ var otab=document.getElementById('tab'); var oinput=otab.getElementsByTagName('input'); var odiv=otab.getElementsByTagName('div'); for(i=0;i<oinput.leng

2015-11-11 14:55:01 1061

原创 jquery插件

$.extend() //扩展到工具方法下$.fn.extend() //扩展到jquery对象下

2015-11-11 11:23:45 205

原创 jquery工具方法

$.type()与typeof()相比获取类型更加精准

2015-11-11 11:12:14 299

原创 jquery运动

animate()宽高不能设添 px  stop() finish() Document .div1{ background: red; width: 100px; height: 100px; } .div2{ background: yellow; width: 50px; height: 50px; } .div3{ backgroun

2015-11-11 09:35:59 408

原创 jquery方法2

parents(): 获取元素所有父节点,参数就是筛选 Document $(function(){ $('.div2').parents().css('background','red');//整个document变红 $('.div2').parents('.div1').css('background','red');//整个div1变红 })

2015-11-10 16:16:55 241

原创 jquery方法1

Document /*jquery里面的一些方法 1.get(0) 2.outerWidth()和offsetWidth一样获取对象width,但是它能获取display:none元素的宽度而offsetWidth不行 3.text()设置或者获取标签文本内容 4.remove()删除标签对象以及对应的事件,detach()只删标签对象 */ $(function(){

2015-11-10 16:15:44 237

原创 $(function(){})与window.onload=function(){}的区别

$(function(){}) ps:dom加载完触发window.onload=function(){} ps:全部元素加载完触发,包括dom和img video等前者的性能更好

2015-11-10 15:36:16 304

转载 offsetwidth

http://www.jb51.net/web/28848.html

2015-11-10 14:53:06 281

原创 inline-block

inline-block①使块元素在一行显示②使内嵌支持宽高③换行被解析④不设置宽度的时候宽度由内容撑开float①使块元素在一行显示②使内嵌支持宽高③不设置宽度的时候宽度由内容撑开(避免换行被解析的缺点)浮动,display,position都能改变标签特性(块级标签,内联标签)

2015-11-09 17:08:47 398

原创 opacity:0-1,filter:alpha(opacity=50)

opacity:0-1 //标准浏览器支持filter:alpha(opacity=50) //IE8及其之下版本使用

2015-11-09 16:10:29 490

原创 内联标签和块标签

内联标签:img,span①同一类型标签并排显示②宽度由内容撑开③不支持宽高(除img标签)④不支持margin,padding块标签:p,div,ol,ul,li

2015-11-09 13:51:08 657

原创 事件监听

attachevent(obj,type)//IE使用addEventListener(obj,type,false)//ff使用, Document function addevent(obj,type,fn){ if(window.attachEvent) { obj.attachEvent('on'+type,fn); }else {

2015-11-09 10:56:27 271

原创 word-break word-wrap

word-break //超出范围文字折行,并排列整齐word-wrap //超出范围文字折行,不排列整齐

2015-11-08 17:24:52 218

原创 IE6

①IE6默认将高度小于19px的元素,设置成19px办法:overflow:hidden;

2015-11-08 13:28:38 406

原创 javascript中var的作用

如果定义一个变量不加var声明,则这个变量为全局变量 Document (function(){ var a=b=10; })() // alert(a);//a受到var声明,为局部变量 alert(b);//由于b没有var声明,所以b为全局变量

2015-11-08 11:41:16 483

原创 jquery链式操作

Document $(function(){ $('ul').find('li').eq(0).css('background','red').end().eq(1).css('background','green').end().end().html('csqclf').find('li').eq(0).css('background','red'); });

2015-11-07 17:52:08 455

原创 把带横杠的字符串转为驼峰字符串

Document var str='border-bottom-color'; function test(str){ var arr=str.split('-');//返回[border,bottom,color]数组 for(var i=1;i<arr.length;i++){ arr[i]=arr[i].charAt(0).toUpperCase() +arr[i].s

2015-11-07 17:32:16 753

原创 javascript数组操作

push()//尾部添加元素unshift()//头部添加元素pop()//从尾部删除元素shift()//从头部删除元素sort()//数组排序,默认按照字符编码循序排concat( )连接两数组var arr3=arr1.concat(arr2 );返回一个变长的数组

2015-11-06 15:10:01 227

原创 获取样式currentstyle(),getComputedStyle()

odiv.style.width;其中的style只能获取行间样式//行间样式currentstyle()//只能在IE里面用getComputedStyle()//只能在FF里用,第一个参数odiv,第二个参数没用随便填

2015-11-06 13:51:52 235

原创 javascript数据类型

Document /*undefined*/ alert(typeof a); /*number*/ var b=12; alert(typeof b); var c='abc'; alert(typeof c); var d=true; alert(typeof d); window.onload=function(){ var obtn=document.g

2015-11-06 09:41:34 211

原创 position定位

子元素使用绝对定位时(position:absolute),父元素必须加上定位属性,一般为相对定位(position:relative)

2015-11-05 16:53:35 283

原创 清除浮动的方法

子元素添加浮动后会对父元素造成影响 清除子元素对父元素的影响:①在main里多添加一个div标签②在父级标签mian样式里overflow:hidden

2015-11-05 16:45:44 245

原创 bom基础

①window.open() Document window.onload=function(){ var obtn=document.getElementById('btn1'); obtn.onclick=function(){ window.open('http://www.baidu.com','_blank'); } }

2015-11-05 13:27:09 267

原创 canvas

Document body{background:black} #canvas{ width: 400px; height: 400px; background: white; } window.onload=function(){ var ocan=document.getElementById('canvas'); var ocan1=ocan.getCon

2015-11-05 10:25:32 257

原创 div随鼠标移动

Document #div1{ width:200px; height: 300px; background: #ccc; position: absolute; } window.onload=function(){ document.onmousemove=function(ev){ var odiv=document.getEleme

2015-11-04 13:44:23 209

原创 document是什么

无标题文档window.onload=function(){ document.onclick=function(){ alert(document.childNodes[1].tagName);//弹出html }}

2015-11-04 11:05:47 376

原创 js正则表达式

两种方式re = new RegExp();re = / /;( perl方式 )方法:search() // 找到匹配字符串的位置;match() //把所有匹配的东西提取出来;元字符 :[ ];\d = [0-9];\w = [a-z0-9_]; //数字,字母,下划线\s 空白字符量词 :个数;+ : 若干;{n} n出现的次数{n,m

2015-11-03 16:53:09 239

原创 jquery动态创建dom节点

Document$(function(){var link = $("csq");$('div:first').append(link);});1234

2015-11-03 13:41:00 294

原创 jquery隐式迭代

Document/*隐式迭代,如果btn1写成btnL的话,浏览器不会报错。友好界面,不方便开发*/// $(function(){// $("#btnl").mouseover(function(){// alert("哈哈");// });// });$(function(){var selector=$("#btn1");if(sele

2015-11-03 13:19:26 850

原创 jquery内置函数

①$.map( )用函数遍历数组中每个元素,有返回值var arr = [3,4,5];var arr2 =$.map(arr,function(num){ return num*2}); alert(arr2);②$.each( ) 无返回值var person = {"张三":23,"李四":34,"王五":33};$.each(person,function(ke

2015-11-03 09:31:16 766

原创 面向对象1

Examples/*属性,变量,函数,方法*/var arr=[12,13,56,34];// alert(typeof arr);var a= 23;// arr.a=4;// alert(arr.a);function show(){ alert(a);}arr.fn=function(){ alert(a)}show();arr.fn();/*原始*/

2015-11-02 10:39:50 184

原创 !important使用

CSS中的!important一般都是用于对低版本的除了iE 6 ,用来做hack的,后面缀上了!important的css语句,让浏览器首选执行这个语句,因为css有继承的样式,加上!importanrt可以覆盖父级的样式。 IE6不认识它的,IE7和别的浏览器中可以用,用来处理浏览器的兼容性,这里写段代码:黄色背景body{background-color:yell

2015-10-26 11:06:30 580

转载 插入排序

插入排序分为直接插入排序和希尔排序      每次将一个待排序的记录,按其关键字大小插入到前面已经排好序的子列表当中的适当位置,直到全部记录插入完成为止。     对直接插入排序我的理解就是:先将第一个记录视为一个有序序列,然后依次将后面的记录插入到这个有序序列中来。每次要插入的记录时,须从后往前依次比较有序序列中的记录,直到找到在有序序列中的位置,记录下该位置

2015-10-20 17:10:43 194

原创 C#

冒泡排序:int [ ]  array ={78,12,45,67,13,89,10}for(i=0;i{for(j=0;j{if(array[j]{int   temp = array[j+1];array[j+1] = array[j];array[j] = temp;}}for(i=0;i{Console.WriteLIne(arr

2015-10-19 13:55:48 252

原创 kendoui分级显示

detailTemplate: kendo.template($("#template1").html()),//显示每行分页 dataBound: function() { // searchBind(); var _this = this; var colcell = $('.k-grid-header .k-hierarchy-cell'); var colal

2015-10-18 15:52:05 631

Packet.Tracer汉化包

Packet.Tracer汉化包

2014-09-17

w3cschool离线文件

w3cschool离线文件 js html css php

2013-10-25

空空如也

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

TA关注的人

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