How to make an image larger while clicking on it?
Date : March 29 2020, 07:55 AM
|
How can I make it so I click on one smaller image so it changes the larger version of the image?
Date : March 29 2020, 07:55 AM
like below fixes the issue For e.g. I have 4 thumbnails and 1 large image. When I click on a thumbnail, the larger image changes to that thumbnail picture. , A couple of possible solutions:
|
Make image larger onclick
Date : March 29 2020, 07:55 AM
To fix the issue you can do hello i need to achieve this --->Make image larger onclick. After different image is selected previous image gets on the size it was before the click and selected image becomes larger , You can use the JQuery addClass and removeClass $('.make_bigger').click(function() {
$('.active').not(this).addClass('non_active');
$('.active').not(this).removeClass('active');
if ($(this).hasClass('active')) {
$(this).addClass('non_active');
$(this).removeClass('active');
} else {
$(this).removeClass('non_active');
$(this).addClass('active');
}
});
.active {
animation: make_bigger 1s ease;
width: 200px;
height: 201px;
}
@keyframes make_bigger {
from { width: 127px; height: 128px; }
to { width: 200px; height: 201px; }
}
.non_active {
animation: make_smaller 1s ease;
width: 127px;
height: 128px;
}
@keyframes make_smaller {
from { width: 200px; height: 201px; }
to { width: 127px; height: 128px; }
}
.container {
width: 200px;
height: 201px;
}
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>
<div class="container">
<img width="127px" height="128px" class="make_bigger" src="http://www.lyricsmode.com/i/upictures/205882.gif">
</div>
<div class="container">
<img width="127px" height="128px" class="make_bigger" src="http://www.lyricsmode.com/i/upictures/205882.gif">
</div>
<div class="container">
<img width="127px" height="128px" class="make_bigger" src="http://www.lyricsmode.com/i/upictures/205882.gif">
</div>
|
How to make image 10% larger from its parent?
Tag : css , By : appdelivery
Date : March 29 2020, 07:55 AM
To fix the issue you can do max-width is restricting your image to grow. Apply max-width: 110%; along with width: 110%; ionic.min.css sets the max-width to 100%. Not sure why it worked for you. Maybe during development this file was not loaded.
|
I would like to make my image pop out larger when I click on it
Date : March 29 2020, 07:55 AM
|