How to make Youtube's sliding navbar effect? - css

code: https://codesandbox.io/s/awesome-wescoff-qpz67y?file=/src/App.js
result I'm looking for: https://preview.redd.it/e3ervmmdrqia1.png?width=764&format=png&auto=webp&v=enabled&s=6002014c7d97d7734e284a7f904e5c3908a15f85
I have a React/NextJS project and I want to make this sliding navbar effect. I tried to emulate what I saw in this video, but it didn't work with my React project. Is there a way to make this effect with my current code?

Related

Vue3 + element-plus side menu: overlay in mobile and animation issue

Vue 3 and UI newbie here. Given this playground area with a code sample, I wanted
In the "collapse" animation of the menu, for the entire menu to slide out (but if you notice, the size of the menu changes first - making it occupy less than 100% of the height - and then it slides out)
If it is a smaller screen, I wanted the side menu to be collapsed by default and for it to be an overlay when sliding in (so the main contents are not pushed by it when sliding in)
As a Vue and UI beginner, I feel like I am going down the wrong paths when trying to explore solutions for these problems, and was hoping the community of experienced developers could help me with them.
I ended up using https://github.com/amirkian007/vue-awesome-sidebar. It is a pretty neat component.

How can I create a hop up image effect with Swiper?

Currently, I'm browsing some pages and I found that there's a page where the design is very pleasing to me. So I'm trying to replicate it, but unfortunately that I can't figure it out due to my lack of CSS skills.
So here's how that page work:
Whenever the class is active, it'll hop up a bit (the page I'm looking at is using Swiper, too!)
But however, the Hop-up image will go out of the box of Swiper
And what I'm doing right now, there's a box just like that page, but the image or anything else if it's larger than the current box, it'll be cut. I can't make it go outside of the Swiper's box.
Here's how I'm currently doing it, I made a quick dataSample and then mapped it, get the current slide to have the active class, and then CSS it. Any help is appreciated, many thanks.
I've left comment on what I'm doing in the CSS at CodeSandbox.
Code: CodeSandbox - Trying to create Hop-up image using Swiper

Bootstrap.4 - Building Carousel Using Slick

I am trying to build a responsive carousel as present in Mecca website. I am using Bootstrap 4 and using slick plugin to build the carousel.
The look and feel i am trying to achieve is the something like this picture
As i am using boostrap 4, to build this tile, I have written the following code and codepen link is given below
[Codepen](https://codepen.io/bzaidi/pen/MWamJvZ)
I am facing the following problems
This carousel is not responsive. I need to change font-size using media queries on almost every resolution. If I see Mecca website, their carousel is perfectly responsive.
When i float the image left, the rightContent div seems to be taking all the width of parent div which is 290px? Why is that?
Is my approach correct?
How can I achieve responsiveness on all resolutions?
Can you someone help me?
Thanks.

Where to start to achieve this animation effect

How can i achieve this kind of animation effect (see link below) and where do I need to start learning, is this part of css or html5 or plugins, etc..
I have a startup knowledge in css and html5, but I have no idea how to achieve the effect.
http://www.terredevenements.com/en/
*the effect i'm referring to is the movement of the foreground images while the mouse hovers and still maintaining its background to be static
This effect is called "parallax scrolling"
The basic idea is to layer images on top of each other and move them simultaneously but at different speeds, foreground moving faster than background.
Capturing and utilizing mouse events can be done with javascript/jQuery, and the animation can also be done with those languages or in combination with CSS3 animations.
There are quite a few jQuery plugins out there that can help you quickly achieve this effect.
See parallax.js
Or for more plugins: http://bashooka.com/coding/best-jquery-parallax-plugins/

How can I make this effect by using css3?

This is an amazing effect like PPT. Link is here :
http://udc.weibo.com/builder2011/data.html
I know single part was made by css3-animation effects but I don't know
1.how to play all these effects in a timeline?
2.how to make position change and local to whole effect?
Where can I find a tutorial like this?
Thanks cordially.
You could actually make the whole thing out of CSS3.
Keyframes is how you'd be able to time the different functions: http://www.leemunroe.com/css3-animations/
You would need something like an entire CSS3 powered page page, and then just place a window over that with overflow hidden. Use keyframe to move the page around but the window will only show a portion of it.
Just realized, that actually happens to be exactly what they did.

Resources