摘要: 思路:子元素绝对定位,距离顶部 50%,左边50%,然后使用css3 transform:translate(-50%; -50%)优点:高大上,可以在webkit内核的浏览器中使用缺点:不支持IE9以下不支持transform属性 阅读全文
posted @ 2017-10-10 19:01 franeu 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 页面上的元素都是节点(Node),有元素节点(Element Node)、属性节点(Attribute Node)、文本节点(Text Node)等。w3c nodeType的定义如下: const unsigned short ELEMENT_NODE = 1; const unsigned sh 阅读全文
posted @ 2016-04-20 21:38 franeu 阅读(980) 评论(0) 推荐(0) 编辑
摘要: 作用:可以截取字符串中的连续的一部分 用例子来记忆: var str = "我来自黑龙江"; (1) alert(str.substring(0,2)); //输出的是“我来” alert(str.substring(2,0));//和上行是一样的结果 alert(str.substring(-3, 阅读全文
posted @ 2016-04-18 21:44 franeu 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 他们两个都是可以使块级元素在一排显示,内联元素支持宽高,默认内容撑开宽度,那谁好谁坏,优点缺点,等我学习完后去解答 阅读全文
posted @ 2016-03-07 22:00 franeu 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 详解JavaScript中的this JavaScript中的this总是让人迷惑,应该是js众所周知的坑之一。 个人也觉得js中的this不是一个好的设计,由于this晚绑定的特性,它可以是全局对象,当前对象,或者…有人甚至因为坑大而不用this。 其实如果完全掌握了this的工作原理,自然就不会 阅读全文
posted @ 2016-02-25 01:31 franeu 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 给元素打上top:50%;left:50%以及margin-top:一半的height值的的负数; margin- left:一半的weight值的负数。整理一下之后,可能你会给你的子元素写上这样的css {width:100px;height:80px;position:absolute;top: 阅读全文
posted @ 2016-02-23 21:53 franeu 阅读(202) 评论(0) 推荐(0) 编辑
摘要: HTML 用户名:<input type="text" id="UserAccount" onKeyPress="JumpByEnter(UserPwd)" /> 密码:<input name="UserPwd" type="password" onKeyPress="IsEnterKeyPress 阅读全文
posted @ 2016-02-21 20:27 franeu 阅读(421) 评论(0) 推荐(0) 编辑
摘要: WinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWinWin Down Mac MacMacMacMacMacMacMacMacMacMacMacMac... 阅读全文
posted @ 2016-01-11 21:15 franeu 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 查看是否是因为等标题元素引起的,由于标题元素都是块级元素,且标题元素会自动空出标题的前后两行,所以在css样式中将标题的display改为inline,就可以成功的消除空隙 阅读全文
posted @ 2015-12-28 23:40 franeu 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 产生的缝隙无法用margin,padding等属性取消时,查询一下是不是由于字体大小不一致引起的,还原font-size应该就好用了。 阅读全文
posted @ 2015-12-25 01:03 franeu 阅读(366) 评论(0) 推荐(0) 编辑