我有一个链接到网页部分的菜单,我希望链接转到标题,但它转到该部分的末尾,这给人的印象是它要转到它下面的部分。我已经尝试了几种方法,这是第一种方法;
<div class="sidebar" style="margin-top: -315px;">
<div class="list-group">
<a href="Index.aspx#WhatIsIt" class="list-group-item active">What is it?</a>
<a href="Index.aspx#Why" class="list-group-item">Why Evercam?</a>
<a href="Index.aspx#API" class="list-group-item">API</a>
<a href="Index.aspx#Pricing" class="list-group-item">Pricing</a>
<a href="MarketPlace.aspx" class="list-group-item">MarketPlace</a>
</div>
</div>
<section id="WhatIsIt">
<div class="row featurette">
<div class="col-md-4">
<i class="icon-camera-retro icon-large"></i>
</div>
<div class="col-md-8" style="margin-left: -55px">
<h2 class="featurette-heading smalltopmargin">What is Evercam?<span class="text-muted">An ideal camera.</span></h2>
<p class="lead">
Evercam makes it easy to interact with IP Cameras. Evercam abstracts the complexity of any IP-based video device, and exposes all its available functionality to you
through a consistent and beautiful <a href="/Develop.aspx">API</a>.
</p>
</div>
</div>
</section>
这是第二种方式;
<div class="terms">
<h3>Index</h3>
<h5><a href="Termsandconditions.aspx#yourrights">Your rights</a></h5>
<h5><a href="Termsandconditions.aspx#cookies">Cookies</a></h5>
<h5><a href="Termsandconditions.aspx#changes">Changes</a></h5>
<h5><a href="Termsandconditions.aspx#ordering">Ordering</a></h5>
<h5><a href="Termsandconditions.aspx#license">License</a></h5>
<h5><a href="Termsandconditions.aspx#siteusage">Site usage</a></h5>
<h5><a href="Termsandconditions.aspx#ownership">Ownership of information</a></h5>
<h5><a href="Termsandconditions.aspx#accuracyofinfo">Accuracy of information</a></h5>
<h5><a href="Termsandconditions.aspx#pricing">Pricing liability</a></h5>
</div>
<h3><a name="yourrights"></a>Your rights</h3>
关于如何解决这个问题的任何想法?