- So I have a image in background and an iframe effect showing an ad above. (Hopscotch one is an ad. The flower is the html image)
- All I am trying to do is to show that ad sliding up from the bottom of the background image. I tried many a things. In search of pure css or pure javascript solution.
The ad should slide from bottom of background image and then get fixed at position at which it is showing. Just a sliding effect from bottom till ad shows.
For example please check ad on this page:-
- So I have a image in background and an iframe effect showing an ad above. (Hopscotch one is an ad. The flower is the html image)
- All I am trying to do is to show that ad sliding up from the bottom of the background image. I tried many a things. In search of pure css or pure javascript solution.
The ad should slide from bottom of background image and then get fixed at position at which it is showing. Just a sliding effect from bottom till ad shows.
For example please check ad on this page:-
http://www.thenewsminute./article/united-states-south-india-can-southern-collective-get-us-better-deal-delhi-46501
Share Improve this question asked Jul 27, 2016 at 7:05 Abhishek SharmaAbhishek Sharma 1,4201 gold badge21 silver badges32 bronze badges 1- 1 share some relevant code so we can help you better – Mihai T Commented Jul 27, 2016 at 7:20
1 Answer
Reset to default 3i guess this is what you are looking for :
.container {
position:relative;
overflow:hidden;
width:300px;
height:200px;
}
.img {
width:100%;
height:100%;
background:blue;
}
.slidemeup{
background:red;
position:absolute;
bottom:-50px;;
height:50px;
width:100%;
left:0;
animation-name:slideup;
animation-delay:0.5s;
animation-duration:0.8s;
animation-fill-mode:forwards;
animation-timing-function:ease-out;
}
@keyframes slideup {
0%{bottom:-50px}
100%{bottom:0;}
}
<div class="container">
<div class="img">
</div>
<div class="slidemeup">
SLIDE ME UP
</div>
</div>
i used a div with class img
instead of the image. but it should work either way