I saw this website http://www.montere.it/?lang=en and I love how they use the Javascript on their website. When you scroll down, the image will slightly appear and flip. I have tried so hard to find the sample online but none of them are like this. Or at least can anyone give me the website that has the Javascript collection.
Appreciate for all your help.
I ripped the CSS animation code straight out of their page
#keyframes flipInY {
0% {
-webkit-transform:perspective(1000px) rotateY(20deg);
-ms-transform:perspective(1000px) rotateY(20deg);
transform:perspective(1000px) rotateY(20deg);
opacity:0
}
100% {
-webkit-transform:perspective(1000px) rotateY(0deg);
-ms-transform:perspective(1000px) rotateY(0deg);
transform:perspective(1000px) rotateY(0deg);
opacity:1
}
}
.flipInY {
-webkit-backface-visibility:visible !important;
-ms-backface-visibility:visible !important;
backface-visibility:visible !important;
-webkit-animation-name:flipInY;
animation-name:flipInY
}
.animated {
-webkit-animation-duration:.7s;
animation-duration:.7s;
-webkit-animation-fill-mode:both;
animation-fill-mode:both
}
Run JSFiddle http://jsfiddle.net/4of7L5aL/4/
Basically when the user scrolls, you add the animated class to the element.
Related
I have set up some scroll animations on many elements of a site I'm building.
I'm using these CSS rules:
.hiddenLeft {
opacity: 0;
filter: blur(5px);
transform: translateX(-090%);
transition: all 1s;
}
.hiddenRight {
opacity: 0;
filter: blur(5px);
transform: translateX(90%);
transition: all 1s;
}
.show {
opacity: 1;
filter: blur(0);
transform: translateX(0);
}
The hiddenLeft and hiddenRight classes are in the elements by default, and then when they are intersected during vertical scroll the show classes are added.
It all works fine, except it has created horizontal scroll to the right out of the width of the site into blank space.
I would like to keep the animations as they are but without the horizontal scroll.
A picture of me scrolling out to the side into the blank space for reference:
enter image description here
I made a very basic replication here:
https://codepen.io/acodeaday/pen/NWMYWNL
I can see that the offending line is
transform: translateX(90%);
But that makes the animation very aesthetically pleasing. So I'm hoping there is a way to solve it while keeping that.
Try using
max-width: 100%!important; height: auto; overflow: hidden!important;
this code whatever you put all of your animation inside. That can be a div. Hope this help~
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
In the following post the image rotates in the plane of the screen CSS3 Rotate Animation, can you help me out on how to make an image rotate into the plane of the page using CSS/JS?
I have added a gif to show the type of rotation I am trying to achieve.
May this help you -:
.coin{
width: 200px;
height: 200px;
border-radius: 50%;
background-color: red;
animation: animate 1s linear infinite;
perspective: 800px;
}
#keyframes animate {
0%{
transform: rotateY(0deg);
}
100%{
transform: rotateY(360deg);
}
}
You need to add a div in html file -
<div class='coin'></div>
I hope this was what you were expecting.. Thanks
What you need simplifies to this:
.image{
animation: spin 1.2s linear infinite;
}
#keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
First, select the image and set animation to an animation with arbitrary name (spin sounds good for something rotating, but choose what you want. spin is the name i choose, 1.2s is duration but it can be ms as well like 500ms or 1200ms.
Then, define the animation by calling #keyframes animationName and then every attributte may be a percentaje, or from/to keywords like this too:
#keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
But by using that way you can't customize that much, you only get a starting and a finish point. With percentajes you can define the animation to do many different stuff.
I hope this helps you out, and let me know if need to clarify something.
i would like to make an images slide effect as this website :
https://www.hackages.io/
I don't know what is the exact name of the effect and If I can do it wiht Jquery / JavaScript or bootstrap ?
Thanks for helping me :D
They are not using any slider plugin or any js for this part.They are using css for this animation.Its a one image only and by using css
animation: collage 60s linear infinite;
#keyframe collage
0% {
-webkit-transform: translateZ(0);
transform: translateZ(0);
}
main.faea32ab.css:5
100% {
-webkit-transform: translate3d(-1800px,0,0);
transform: translate3d(-1800px,0,0);
}
using above css they are achieve this slider.If you want to add slider so try to use crawler.js slider for same effect.
I got completely stuck on this. I have a container with background image. Inside the container are 3 little circles. What I am trying to do is to zoom the background image when I hover over it and dim the background image when I hover over any of the 3 little circles.
I got to the point where the 3 circles are properly overlapping the container and the background zooms in on hover. But I have 2 issues
no. 1 I am not very fond of the way I am achieving the overlay of the circles, which is this code
#circle_wrap{
position: absolute;
margin-top: -130px;
}
no. 2 Is that I have no clue how to dim the background. My original intention was to have a hidden black conteniner with 0.5 opacity that would be displayed when I hover over one of the circles. But I couldn't figure out how to select the overlay.
JSFIDDLE here
If anything couldn't be solved with css only, I'd accept jquery solution as well.
I'm looking for any advice/tips/solutions you guys have, I really need to get this working.
Thank you.
Finally got so angry I am not able to do it with css that I made it with jquery :(
If anyone is interested here is the result
I have at least fixed the issue no1 with better css but the second is done with jquery.
solved no.1 with
.circle_wrap{
position: absolute; bottom: 0; width: 100%; height: 100px;
}
and applying position:relative on its parent
and the solution for no.2 is
$(".circle_wrap").hover(function () {
$(this).siblings("img").css("opacity", "0.2");
},
function () {
$(this).siblings("img").css("opacity", "1");
});
EDIT: safari support
.wrap img:hover{
-moz-transition: scale(1.1) rotate(0deg);
transform: scale(1.1) rotate(0deg);
-webkit-animation-name: scaleThis;
-webkit-animation-duration:5s;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function:ease-in-out;
}
#-webkit-keyframes scaleThis {
0% { -webkit-transform:scale(1) rotate(0deg); }
10% { -webkit-transform:scale(1.1) rotate(0deg); }
100% {-webkit-transform:scale(1.1) rotate(0deg); }
}
I searched couple threads, also read the skrollr documentation but i didnt find what im searching for.
my problem is:
i want to make a (self)animation of object(image .png, simple slide from 0px; left to 1200px; right) and also make a skrollr slide effect on that object, so it looks like animated object being skrollr also ;)
.html:
<div id="chm1" data-0="background-position:0px 0px;" data-600="background-position:-600px -200px;"></div>
.css:
#-webkit-keyframes slide {
from{
background-position:-600px;
}
to{
background-position:1200px;
}
}
#chm1 {
-webkit-animation: slide 15s linear infinite;
background:url(ch1.png) repeat 0 0;
background-repeat:no-repeat;
z-index:50;
top:20%;
left:0;
width:100%;
height:100%;
}
is it even possible to do that?
Thanks for reply.