---
title: "div瞄点"
author: "cainwise"
date: "2011-11-05T10:55:57Z"
tags: []
categories: ["Web前端"]
slug: "div"
draft: false
lastmod: "2011-11-05T10:55:57Z"
id: 1236243
url: "https://cainwise.iteye.com/blog/1236243"
---

&lt;html&gt;  
&lt;head&gt;  
&lt;meta http-equiv="Content-Type" content="text/html; charset=gb2312" /&gt;  
&lt;style type="text/css"&gt;  
.main{ height:1500px; }  
.container{ height:300px; overflow:scroll; overflow-x:hidden; background:#ccc; }  
.container p{ margin:20px 0; }  
&lt;/style&gt;  
&lt;/head&gt;  
&lt;body&gt;  
&lt;div class="main" &gt;  
    &lt;a href="javascript:point.scrollIntoView(false);"&gt;锚点连接&lt;/a&gt;  
    &lt;div class="container" &gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p id="point"&gt;锚点连接&lt;/p&gt;  
        &lt;p&gt;stop1222&lt;/p&gt;  
        &lt;p&gt;stop1111&lt;/p&gt;  
        &lt;p&gt;stop1111&lt;/p&gt;  
        &lt;p&gt;stop11222&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
        &lt;p&gt;stop1&lt;/p&gt;  
    &lt;/div&gt;  
&lt;/div&gt;  
&lt;/body&gt;  
&lt;/html&gt;