如何制作单页网站

时间:2021-10-22 17:24:45

when i was browsing I found a website that using single page only but using different background each navigation...I'm just a new web programmer does anyone know a good basic tutorial to learn this stuff? I wanna build a website that uses single help me please.

当我浏览时,我发现一个网站只使用单页但每个导航使用不同的背景......我只是一个新的网络程序员有没有人知道一个很好的基础教程来学习这些东西?我想建立一个使用单一帮助我的网站。

http://mypizzaoven.nl/#data-home

1 个解决方案

#1


1  

If you manually zoom out you can see that they've literally just laid the page out that way. They use overflow: hidden: to make the page unscrollable, and then set the margins to be negative so that they can put things off of the page.

如果您手动缩小,您可以看到他们确实只是将页面放在那边。他们使用overflow:hidden:使页面不可滚动,然后将边距设置为负值,以便它们可以将页面放置在页面之外。

The primary thing they do, though, is use ids and the #id to then go to that part of the page.

但他们做的主要事情是使用id和#id然后转到页面的那一部分。

Example:

<div id="pizza"></div>

You would then use thispage.html#pizza to focus on that part of the page.

然后,您将使用thispage.html #pizza重点关注页面的该部分。

#1


1  

If you manually zoom out you can see that they've literally just laid the page out that way. They use overflow: hidden: to make the page unscrollable, and then set the margins to be negative so that they can put things off of the page.

如果您手动缩小,您可以看到他们确实只是将页面放在那边。他们使用overflow:hidden:使页面不可滚动,然后将边距设置为负值,以便它们可以将页面放置在页面之外。

The primary thing they do, though, is use ids and the #id to then go to that part of the page.

但他们做的主要事情是使用id和#id然后转到页面的那一部分。

Example:

<div id="pizza"></div>

You would then use thispage.html#pizza to focus on that part of the page.

然后,您将使用thispage.html #pizza重点关注页面的该部分。