开发者

Do not scroll with anchor, simply change div?

开发者 https://www.devze.com 2022-12-18 19:16 出处:网络
Lemme explain my situation here: I\'m trying to make a layout for a website. This goes in a small box, and can include HTML and CSS, yet not javascript. I have a small box inside this, with tabs to li

Lemme explain my situation here: I'm trying to make a layout for a website. This goes in a small box, and can include HTML and CSS, yet not javascript. I have a small box inside this, with tabs to link to different things. This is done via putting the divs in a box and using anchor tags to get to them.

Thi开发者_StackOverflows is totally fine, until the page has a scrollbar. Then, when you click on the anchor tag, it scrolls. This is a problem as if moves the whole page, and even the tabs aren't visible anymore. Is it possible to get this to work, without any javascript, or should I just put this in an iframe hosted on my own website and get past it that way? :/

Thanks!


Seems like a simple scrolling div will do the trick. No javascript needed. Much better than an iFrame, I think.

http://www.htmlite.com/faq015.php

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号