摘要: 在有些网页中我们会发现会有这样的现象:某个div会随着屏幕的滚动达到一定高度的时候位置就固定下来了。例如一下导航条: 那么这里就需要用到JS的逻辑方法来实现了。 html js 阅读全文
posted @ 2019-12-04 10:20 小蓉儿 阅读(2602) 评论(0) 推荐(0) 编辑
摘要: 三种方法: 1.document.getElementById("id").style.height,这种方法的前提是必须之前已经显示的在css中声明过height,才能取得正确的值 2.document.getElementById("id").clientHeight 3.document.ge 阅读全文
posted @ 2019-12-04 10:11 小蓉儿 阅读(8012) 评论(0) 推荐(1) 编辑
摘要: https://www.cnblogs.com/xiaoxiao2017/p/10515819.html 阅读全文
posted @ 2019-12-04 10:05 小蓉儿 阅读(316) 评论(0) 推荐(0) 编辑