Skip to content
Advertisement

How to solve issue in @media screen CSS in react

I am creating a project where the navigation bar style changes according to the device type [PC/Mobile] but I don’t know how to change the CSS method

according to this website we can do it but it’s using the old version of react and when I tried in mine then its full of error

So, my code: I need to animate that <div className="mobileMode">

JavaScript

and the css part: See I need to animate onClick to that .navLink.open and that li.fade

I Have got this code from YouTube

JavaScript

whole code is there at: Github

Advertisement

Answer

The problem was where you placed style with the clip-path option. You have specified for each child .navLink, but must be a parent ul. I’m did replicate in the sandbox. example

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement