ITeye博客

div瞄点

cainwise · 2011-11-05 10:55 · html · Web前端 · Markdown

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。