Transform the CSS animation to include a sliding down motion combined with a blur effect

Can the CSS transition be changed to allow for a sliding down effect with a blur effect? I am looking to change this CSS animation effect to match the gif image shown below. Is it achievable using JavaScript, CSS, or a combination of both? Any help in solving this problem would be greatly appreciated. Thank you in advance.

How can these image transitions be modified to resemble the movement in the gif image type?

body {
     background-color: #222;
}
 .screen {
     background-image: url(https://41.media.tumblr.com/tumblr_lvv2z3bsYG1qz7u7yo1_1280.jpg);
     height: 540px;
     left: 50%;
     overflow: hidden;
     position: absolute;
     top: 100px;
     transform: translate(-50%);
     width: 960px;
     box-shadow: 0px 0px 40px #111;
}
 .screen:hover .pic1 {
     -webkit-filter: blur(20px);
     filter: blur(20px);
     transform: scale(1.1);
     opacity: 0;
}
 .screen:hover .pic2 {
     -webkit-filter: blur(0px);
     filter: blur(0px);
     transform: scale(1);
     opacity: 1;
}
 .pic1 {
     position: absolute;
     z-index: 2;
     transition: 0.4s;
     transform-origin: 50%, 50%;
}
 .pic2 {
     -webkit-filter: blur(20px);
     filter: blur(20px);
     transform: scale(1.1);
     opacity: 1;
     transition: 0.4s;
}
 .button {
     text-align: center;
     background-color: #aaa;
     height: 50px;
     width: 250px;
     border-radius: 25px;
}
 span {
     font-size: 20px;
     display: inline-block;
     margin-top: 15px;
     font-family: 'Helvetica';
     font-weight: bold;
     position: absolute;
}
 
<div class="screen">
<img class="pic1" src="https://41.media.tumblr.com/tumblr_m0u1feK1tA1r81skpo1_1280.jpg" alt="City" />
<img class="pic2" src="https://41.media.tumblr.com/tumblr_lvv2z3bsYG1qz7u7yo1_1280.jpg" alt="City" />
</div>

Answer №1

You're all set!

CSS code snippet:

animation: slideWithBlur 2s infinite normal ease-out;

@keyframes slideWithBlur {
   0% {
      top: 500px;
      filter: blur(0px);
      -webkit-filter: blur(0px);
   }
   10% {
      top: 450px;
      filter: blur(3px);
      -webkit-filter: blur(3px);
   }
   20% {
      top: 400px;
      filter: blur(6px);
      -webkit-filter: blur(6px);
   }
   30% {
      top: 350px;
      filter: blur(9px);
      -webkit-filter: blur(9px);
   }
   40% {
      top: 300px;
      filter: blur(12px);
      -webkit-filter: blur(12px);
   }
   50% {
      top: 250px;
      filter: blur(15px);
      -webkit-filter: blur(15px);
   }
   60% {
      top: 200px;
      filter: blur(18px);
      -webkit-filter: blur(18px);
   }
   70% {
      top: 150px;
      filter: blur(21px);
      -webkit-filter: blur(21px);
   }
   80% {
      top: 100px;
      filter: blur(24px);
      -webkit-filter: blur(24px);
   }
   90% {
      top: 50px;
      filter: blur(27px);
      -webkit-filter: blur(27px);
   }
   100% {
      top: 0px;
      filter: blur(30px);
      -webkit-filter: blur(30px);
   }
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble with $cordovaImagePicker in Ionic-Framework?

I am encountering difficulties with the Image Picker ngCordova plugin in my ionic app. Whenever I try to execute the getPictures() function on android (both on my device and emulator), the app crashes. The function works on IOS in the emulator but not on a ...

The mat-datepicker appears in a unique location each time it is opened

I am facing an issue with my mat-datepicker appearing in the opposite place when clicked on one component. How can I resolve this? I have two different components with mat-datepicker, but they behave differently. I suspect that imitating a click in one com ...

Angular2 provides a simple way to toggle the visibility of modal boxes on a web page

I'm encountering an issue with the ng2 modal in my template - it's not opening or hiding through my TypeScript code. <modal id='saveeditsmodal'> <modal-header> <h4 class="modal-title">Editing item(s) in ...

One way to determine whether .ajax is using Get or POST is to check the type parameter

I have a query: $.ajax({ url: "http://twitter.com/status/user_timeline/treason.json?count=10&callback=?", success: function (data, textStatus, jqXHR) { }, error: function (jqXHR, textStatus, errorThrown ...

The JavaScript code malfunctions when I introduce a new HTML tag

I am attempting to create a simple photo gallery using PhotoSwipe. However, I have encountered an issue where certain functions like Previous and Next buttons stop working when I add new HTML elements. Here is the original code: <div class="my-gallery ...

Modifying the href in Django according to the current page URL: a step-by-step guide

Like the title suggests, I'm curious about the proper way to dynamically change a link's href based on the current URL that the user is visiting. I attempted a solution, but it proved unsuccessful. {% if url == '' %} href='/cooki ...

Is JQuery Mobile panel still not functioning properly with JQuery 2.0.3?

Experiencing issues with loading JQM panels. Using Jquery v2.0.3 and JQM v1.3.2. The JS console is showing the following error: Uncaught TypeError: Cannot read property 'options' of undefined Line# jquery.mobile-1.3.2.js:10330 After some resea ...

Exploring the Various Path Options in Angular 2 Routing

As a newcomer to Angular and Node JS, I am currently working on an application and struggling with how to efficiently navigate between my different components. Users can input the name of a user and add books associated with them When clicking on a book ...

What is the best way to modify just a portion of the state in React?

Consider the following State object: const initialState = { data: { user: '', token: '', } } In the Reducer function: case 'DO_SOMETHING': return {...state, data: action.payload } If I make a shallow copy of th ...

How to use jQuery to Convert a JSON data array within nested objects

When dealing with HTML code containing multiple div data, I attempted to extract the text and its values using a jQuery concept. My goal is to organize the code into array structures. <div class="woocommerce"> <div class="addon-blocks" id="ad ...

Bizarre Actions of a JavaScript Object

Currently, I am in the process of developing a Multiplayer game using Phaser and Eureca io. My main focus right now is on perfecting the authentication of players and their controls. To achieve this, I have implemented a method on the server that retrieves ...

When attempting to overlay CSS text onto an image, the text appears to be hiding behind the

Essentially, what I was attempting to do was overlay some text on top of an image on a website I'm creating. After researching online, I learned that I could achieve this by using position absolute and relative, which worked to some extent. However, n ...

Creating an outlined effect on a transparent image in a canvas: step-by-step guide

Currently, I am working on creating transparent images using canvas in HTML5 and I would like to incorporate borders into them. The issue I'm facing is that the "Stroke" property does not consider the transparency of the image and applies it as if it ...

Discover the best practices for incorporating max-width into a bootstrap d-flex container with rounded corners

I have been working on a login page design using bootstrap, but I am facing an issue with the width of a div element that I want to use for placing a logo. The w-100 class doesn't seem to be making it full width as intended. To see the problem and my ...

Troubleshooting Error 400 while fetching JSON data using $http.get method in AngularJS

I keep encountering a 400 error when attempting to fetch the JSON data from the following URL using $http.get. $http.get('https://api.spotify.com/v1/search?q=artist:Owl+City+title:On+The+Wing&type=track&limit=1'). success(function(data) ...

Extracting the nearest tag for a specific element by utilizing text containment in Selenium with Java

Is there a way to fetch the tag under which the text is visible without selecting parent elements that contain the same text when using getTagName for all tags? <ul> <li> The Text </li> </ul> In the example above, if we use contain ...

Prop type failure: The `actions` prop is specified as mandatory in the `Testing` component, however, its value is currently undefined

I am working on a project that involves creating a login form using React and Redux. Here's a snippet of my app.js: import React from 'react'; import { render } from 'react-dom'; import Input from 'react-toolbox/lib/input&apo ...

The Ajax post is only activated on one occasion

Hello there, I am encountering a problem with an ajax function. My goal is to post data to a database and then update a table that displays the database information. Strangely, the process works fine the first time - data is posted and the table is refresh ...

Modify select options using JavaScript without losing the selected choice

I am attempting to update the options list of a select element using JavaScript and jQuery while retaining previously selected values. Below is the code I am using: var temp = $('#SelectName').chosen().val(); select = document.getEleme ...

Troubleshooting directive not functioning properly with AngularJS ng-click

My HTML img tag is not responding to ng-click when clicked. I'm puzzled by this issue occurring in masonryPictureView.html Main page - home.html <ng-masonry> <ng-picture ng-items="projectdescription.pictures"></ng-picture> </n ...