• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
haihai_on
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2017年9月28日

用Javascript获取页面元素的位置
摘要: 参考链接: http://www.ruanyifeng.com/blog/2009/09/find_element_s_position_using_javascript.html 阅读全文
posted @ 2017-09-28 11:16 haihai_on 阅读(133) 评论(0) 推荐(0)
 
 

2017年8月17日

this指向问题
摘要: this的指向,是在函数被调用的时候确定的。(也就是执行上下文被创建 时确定的)一、全局对象中的this全局环境中的this,指向它本身二、函数中的this在一个函数上下文中,this由调用者提供,由调用函数的方式来决定。如果调用者函数被某一个对象所拥有,那么该函数在调用时,内部的this指向该对象 阅读全文
posted @ 2017-08-17 14:29 haihai_on 阅读(161) 评论(0) 推荐(0)
 
 

2017年8月11日

天生就慢的DOM如何优化?
摘要: 浏览器中的DOM 原文链接https://segmentfault.com/a/1190000008267184 DOM是(Document Object Model)一个与语言无关的、用来操作XML和HTML文档的应用程序接口(Application Program Interface)。 尽管D 阅读全文
posted @ 2017-08-11 11:28 haihai_on 阅读(335) 评论(0) 推荐(0)
 
 

2017年8月9日

CSS文本溢出显示省略号
摘要: 单行 //单行 .single-line{ width:200px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; } <div class="single-line"></div> //多行 .multiple-line{ 阅读全文
posted @ 2017-08-09 14:26 haihai_on 阅读(182) 评论(0) 推荐(0)
 
 

2017年7月27日

tab页切换效果
摘要: jquery简单tab页效果 html javascript 素材网有很多关于tab切换的插件 链接:http://www.huiyi8.com/tab/texiao/ 纯css样式效果 1、利用a标签的锚点 2、 利用radio按钮和:checked选择器 阅读全文
posted @ 2017-07-27 16:48 haihai_on 阅读(264) 评论(0) 推荐(0)
 
商城分类导航
摘要: html + css 实现商城分类效果 效果如下: 1、html 2、css代码 阅读全文
posted @ 2017-07-27 15:50 haihai_on 阅读(200) 评论(0) 推荐(0)
 
 

2017年7月21日

实现元素的水平垂直居中
摘要: 水平居中 方法1:若是行内元素(自身不具备宽度,高度,也就是说设置宽度,高度,不起作用,由自身内容撑大,比如a,b(加粗),strong(强调),i,span,img,input,select),给其父级元素设置text-align:center,可以实现行内元素水平居中,代码如下示例所示 html 阅读全文
posted @ 2017-07-21 11:17 haihai_on 阅读(1871) 评论(0) 推荐(0)
 
 

2017年6月26日

事件监听全集
摘要: // event(事件)工具集,来源:github.com/markyun markyun.Event = { // 页面加载完成后 readyEvent : function(fn) { if (fn==null) { fn=document; } v... 阅读全文
posted @ 2017-06-26 11:02 haihai_on 阅读(168) 评论(0) 推荐(0)
 
 

2017年6月23日

window.open
摘要: Window.open()方法参数详解 1, 最基本的弹出窗口代码 window.open('page.html');2, 经过设置后的弹出窗口 window.open('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, 阅读全文
posted @ 2017-06-23 17:34 haihai_on 阅读(161) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3