例如:使用height和width来查看属性值,也可以设定。
div{ width: 100px; height: 100px; padding: 20px; margin:30px; border: 2px solid yellow; }3.innerHeight()和innerWidth()方法
例如:
1.使用innerHeight和innerWidth得到的数值,会加上padding,但不加border!这里和上一个的方法有一个加不加padding的区别。
2.padding有两个,所以加双倍。
div{ width: 100px; height: 100px; padding: 100px; margin:30px; border: 20px solid yellow; }例如:
1.offset()方法获取坐标值,当然和其他方法一样,也可以设置坐标。
2.offset()方法设置坐标。
div{ width: 100px; height: 100px; padding: 100px; margin:30px; border: 20px solid yellow; }5.outerHeight()和outerWidth()方法
例如:
1.outerHeight()和outerWidth()方法,包括了padding,margin,border,注意上下要双倍。
2.这里默认为false,是不添加margin的,想要计算margin,就要添加true。
3.添加true,来加上margin的计算
div{ width: 100px; height: 100px; padding: 100px; margin:30px; border: 20px solid yellow; }position()方法和offset()方法的坐标不一样!
例如:
1.position()方法所指定的元素是和父级元素所确定的坐标。
2.这里和offset()方法不一样!offset是和左上角最顶端定位的。
*{ margin:0; padding: 0; } div{ padding: 15px; background-color: antiquewhite; position: absolute; left:100px; top: 100px; } p{ margin-left: 10px; background-color: aquamarine; }内部里面。
例如:
1.这两个方法一般和overflow属性配合使用。
2.scrollTop方法改变开始的垂直坐标位置。
3.scrollLeft方法改变开始的水平坐标位置。
.d{ width: 200px; height: 100px; overflow: auto; margin: 5px; padding: 5px; position:relative; border: 3px solid #666666; background-color: #cccccc; } p{ width: 1000px; height: 1000px; margin: 10px; padding: 5px; border: 2px solid #666666; }您好啊
hello
========================================================================
index是索引。
例如:
1.eq方法通过index来找到相应的元素!
2. 这里注意index索引从0开始
3.eq方法的索引也可以是负数,也就是倒着来决定。
- li 1
- li 2
- li 3
- li 4
1.filter选择器,:odd和:even,注意的是也是从0开始的。
2.filter选择器,通过是用class名来选择。
3.filter方法接受一个函数,返回一个只有一个string标签的元素,来执行css事件。
例如:
div{ width: 50px; height: 50px; background-color: aquamarine; float: left; margin-left: 10px; }- li 1
- li 2
- li 3
- li 4
-
s1
-
s2
s3
顾名思义,就是获取匹配元素的第一个或者最后一个元素。
例如:
- li 1
- li 2
- li 3
匹配是否含有has()方法里内容,包括子代元素,是否匹配。
例如:
- li 1
- li 2
- li 3
- li 1
- li 2
- li 3
判断是否是is中的内容,是,返回true;否,返回false。
例如:
注意点击strong和span是无效的,因为target指向li标签。
- listitem 1
- list item 2
- list item3
not,就是不是,的意思。读代码的时候就翻译成不是就可以。
- listitem 1
- list item 2
- list item3
map()方法是使用函数来运行的,它会产生一个新的jQuery对象。
1.下面是使用map打印出div的id名。
2.使用map来给数组中的每一个数值加4
例如:
总结
-
对于框架原理只能说个大概,真的深入某一部分具体的代码和实现方式就只能写出一个框架,许多细节注意不到。
-
算法方面还是很薄弱,好在面试官都很和蔼可亲,擅长发现人的美哈哈哈...(最好多刷一刷,不然影响你的工资和成功率????)
-
在投递简历之前,最好通过各种渠道找到公司内部的人,先提前了解业务,也可以帮助后期优秀 offer 的决策。
-
要勇于说不,对于某些 offer 待遇不满意、业务不喜欢,应该相信自己,不要因为当下没有更好的 offer 而投降,一份工作短则一年长则 N 年,为了幸福生活要慎重选择!!!
第一次跳槽十分忐忑不安,和没毕业的时候开始找工作是一样的感受,真的要相信自己,有条不紊的进行。如果有我能帮忙的地方欢迎随时找我,比如简历修改、内推、最起码,可以把烦心事说一说,人嘛都会有苦恼的~
祝大家都有美好的未来,拿下满意的 offer。 开源分享:docs.qq.com/doc/DSmRnRG…