Bhupinder Kumar Bhupinder Kumar - 1 year ago 137
CSS Question

css transition from right to left on click with css

I am trying to make the css for right to left div when it will open but i dont want use any java script and jquery only need pure css.

enter image description here

Answer Source

You can make in center and do like this with css

 section { 
      position: relative;
      margin:50px auto


    div { 
      position: absolute;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;  
      background: #6698F5;
      clip: rect(0, 100vw, auto, 100vw);
      animation: slide 1.5s linear 1s forwards; 

    @keyframes slide {
      100% { clip: rect(0, 100vw, auto, 0); }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download