我的目的是要讓點擊右下角的那個藍色的方塊,然后跳到頂部的導航橫欄那為什么沒用啊<!DOCTYPE html><html><head>? ? <meta charset="utf-8">? ? <title>ad</title>? ? <style type="text/css">? ? ? ? *{margin: 0; padding: 0;}? ? div{background: red; width: 100%; height: 3000px;}? ? div#list{height: 100px; width: 100%; background: green; position: fixed;}? ? div#go{height: 100px; width: 100px; background: blue; position: fixed; bottom: 10px; right: 10px;}? ? </style>? ? <script type="text/javascript" src="http://www.keleyi.com/keleyi/pmedia/jquery-1.9.1.min.js"></script>?? ? ?<script type="text/javascript">? ? ?? ? ?$(function () {?? ? ?$(window).scroll(function () {?? ? ? ? if ($(window).scrollTop() > 200) {?? ? ? ? $("#list").slideUp(1000);?? ? ?}?? ? ? else {?? ? ? ? $("#list").slideDown(1000);?? ? ?}?? ? });?? ??? ? $("#go").click(function(){? ? ?$(“html,body”).animate({scrollTop:$(“#list”).offset().top},1000);? ? });? });?? ??? ? </script></head><body>?<div>? <div id="list"></div>? <div id="go"></div>?</div></body></html>
請問要實現錨點平滑的轉跳為什么我這個代碼沒有用啊,請問要怎么改嗎
無節操司機
2017-01-31 23:57:19