0

I'm using dropzone.js and I would like to remove the blur effect when I hover on top of my uploaded image preview.

You can observe this behavior directly on the website from dropzone's home page, on the example. https://www.dropzonejs.com/

Thanks guys!

Djodjo
  • 95
  • 10
  • Can you add your existing code? – Toby Dec 27 '18 at 17:20
  • Hey Toby, thanks for your reply. It's not necessary to add the code I think, if you go on the welcome example of dropzone.js, you can directly try there and see the full code with the inspector. – Djodjo Dec 28 '18 at 10:59

3 Answers3

1

Found it!

We need to overwrite this class:

.dropzone .dz-preview:hover .dz-image img {
  -webkit-transform: scale(1.05, 1.05);
  -moz-transform: scale(1.05, 1.05);
  -ms-transform: scale(1.05, 1.05);
  -o-transform: scale(1.05, 1.05);
  transform: scale(1.05, 1.05);
  -webkit-filter: blur(8px);
  filter: blur(8px); }

Changing -webkit-filter:none; filter: none;

Thanks

Djodjo
  • 95
  • 10
0

Try using the inspector and check the class that it is giving you that efect, I think it is called dz-preview or dz-details, and change the css to your liking or take down the hover effect by commenting it.

Danielle Lpz
  • 312
  • 3
  • 14
  • Hi, thanks for you answer. I couldn't manage to find the css param to change in the inspector. I can overwrite .dz-image and add color borders for instance, but not remove the blur effect. Any idea? – Djodjo Dec 28 '18 at 10:56
  • The blur effect is handled by the css, I got to change it. Dropzone has two css, on is basic, there you don't need to change anything, and the other one is Dropzone, there is where you need to find the hover effect. .dropzone .dz-preview.dz-file-preview .dz-image { border-radius: 20px; background: #999; background: linear-gradient(to bottom, #eee, #ddd); //this one } – Danielle Lpz Jan 02 '19 at 18:23
0

You can do it like this

.dropzone .dz-preview:hover .dz-image img {
      -webkit-transform: scale(1.05, 1.05);
      -moz-transform: scale(1.05, 1.05);
      -ms-transform: scale(1.05, 1.05);
      -o-transform: scale(1.05, 1.05);
      transform: scale(1.05, 1.05);
      -webkit-filter: blur(8px);
      filter: blur(0px);
    }
Everything good
  • 321
  • 4
  • 10