摘要: 1,show()方法和hide()方法$("selector").show() 从display:none还原元素默认或已设置的display属性$("selector").hide() 设置元素的display样式为none,等于$("selector").css("display","none" 阅读全文
posted @ 2016-09-23 20:34 2350305682 阅读(219) 评论(0) 推荐(0)
摘要: "top.location.href"是最外层的页面跳转"window.location.href"、"location.href"是本页面跳转"parent.location.href"是上一层页面跳转. location是window对象的属性,而所有的网页下的对象都是属于window作用域链中 阅读全文
posted @ 2016-09-23 17:40 2350305682 阅读(21112) 评论(0) 推荐(0)
摘要: 在一个页面里做一个区域引入另一个页面的方法: <a href="http://www.baidu.com" target="in">百度</a> | <a href="http://www.haosou.com" target="in">好搜</a> <br> <iframe src="http:/ 阅读全文
posted @ 2016-09-23 17:18 2350305682 阅读(216) 评论(0) 推荐(0)
摘要: 一个name可以同时对应多个控件,比如checkbox和radio而id必须是全文档中唯一的 id的用途1) id是HTML元素的Identity,主要是在客户端脚本里用。2) label与form控件的关联,如 <label for="MyInput">My Input</label> <inpu 阅读全文
posted @ 2016-09-21 22:41 2350305682 阅读(716) 评论(0) 推荐(0)
摘要: 使用display:inline-block产生间隙 一、产生的原因:当初设立标准的不是亚洲而是欧洲,inline元素为了正确显示英文字母如y j g等带有尾巴的,就在底下留空。二、解决办法: 阅读全文
posted @ 2016-09-20 20:49 2350305682 阅读(141) 评论(0) 推荐(0)
摘要: 注意:body、section、nav 需要h1-h6. div、header则不需要。 1):<article> 显示一个独立的文章内容。 例如一篇完整的论坛帖子,一则网站新闻,一篇博客文章等等,一个用户评论等等。artilce可以嵌套,则内层的artilce对外层的article标签有隶属的关系 阅读全文
posted @ 2016-09-20 11:46 2350305682 阅读(768) 评论(0) 推荐(0)
摘要: 子选择器(child selector)仅是指它的直接后代,即第一代后代,它通过“>”进行选择。 后代选择器是作用于所有子孙元素,它通过空格来进行选择。 总结:>作用于元素的第一代后代,空格作用于元素的所有后代。 阅读全文
posted @ 2016-09-19 12:29 2350305682 阅读(675) 评论(0) 推荐(0)
摘要: 1、单独文字垂直居中我们只需要设置CSS样式line-height属性即可。 2、文字与图片同排,在设置div高度同时再对此css样式的图片“img”样式设置vertical-align:middle垂直居中属性,如.yangshi img{vertical-align:middle;} 。 3 不 阅读全文
posted @ 2016-09-19 09:04 2350305682 阅读(145) 评论(0) 推荐(0)
摘要: 总结要点: 一、封装的一个cookie函数; 二、获取input的value值:$("input[name=user]").val() 三、设置input的value值:$("input[name=user]").attr("value",getCookie("user")); <!DOCTYPE 阅读全文
posted @ 2016-09-11 19:40 2350305682 阅读(1064) 评论(0) 推荐(0)
摘要: 思路:1、拖拽原理:距离不变(拖拽过程中,鼠标到div的left和top值不变)。 2、三个步骤:mousedown:存储距离;mousemove:根据距离,计算div最新的位置;mouseup:关闭拖动和抬起的行为。 3、mousedown时加上return false;防止火狐下出现的bug; 阅读全文
posted @ 2016-09-09 17:33 2350305682 阅读(175) 评论(0) 推荐(0)