M
M
Mikle8882017-12-03 10:55:43
JavaScript
Mikle888, 2017-12-03 10:55:43

There is a site with a gallery. It is required to make the images enlarge on hover. But they go beyond the screen. How to fix it?

Did it like this:

.content .col-12 .card .img .block:hover {
          transform: scale(2);
          background-color: white;
          transition: 0.1s all;
        }

And when you zoom in, you get this:
5a23ad46cbe71442963951.jpeg
How do I fix this?
Block code with a picture:
<div class="block">
    <img class="lazyImg" data-original="img/Grandex/Adventure/A-403.JPG" alt="Картинка">
    <p>A-403</p>
</div>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Bogachev, 2019-09-18
@Kreep74

The panolens.js library wants to have a specific version of three.js that it has as a dependency ( currently 0.105.2 ), and yours is using a different version. Replace three.js in your project with version 0.105.2 - npm keeps old packages, so this shouldn't be a problem.

A
Anton Filippov, 2017-12-03
@Mikle888

https://www.w3schools.com/csSref/css3_pr_transform... will help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question