Home > Blockchain >  I'm looking for something like graphic layers in Node JS
I'm looking for something like graphic layers in Node JS

Time:11-20

I am looking for something that will help me create some kind of graphic layers in the user interface with the help of Node JS. I'll even give stackoverflow.com as an example: the top bar is always visible despite scrolling down, and that's more or less the effect I mean. Do I have to use something else for this or is the Node JS itself able to do it? I think that I do not need the code, but only the name of the module or library that has such a function, or if the Node itself has such a function, then some link where I can find information about it.

CodePudding user response:

Things like a title bar that sticks to the top are accomplished with HTML and CSS in your web page. That has nothing specifically to do with nodejs at all. Nodejs would be your http server. It would deliver HTML pages to the browser (when requested), but the actual layout of the page in the browser has to do with the HTML you design in your page, not to do with nodejs itself and you would use the same HTML/CSS design whether you were using nodejs or any other web server.

The general CSS tech involved in doing this involves the CSS style position and various effects can be achieved with any of the position values described here other than static. Things that are often used for this (depending upon the exact behavior you want) are position: sticky or position: fixed. The stackoverflow header uses position: fixed along with some other CSS to achieve what it does.

Here's a tutorial on how position: sticky works.

  • Related