---
title: "将指定的element滚动到窗顶"
author: "wilent"
date: "2015-09-18T20:22:30Z"
tags: []
categories: ["Web前端"]
slug: "element"
draft: false
lastmod: "2015-09-18T20:32:17Z"
id: 2244574
url: "https://wilent.iteye.com/blog/2244574"
---

var top = $('#comment-bar').offset().top;  
document.body.scrollTop = top;