Sliding captions not working - html

Im using a pure css sliding caption for one of my pages. The intention is for the whole caption to slide out from the right to left when the image is hovered over.
However, it doesnt seem to be working. I based my code on http://www.hongkiat.com/blog/css3-image-captions/ ,so that the fullwidth image will have a caption. It is the "programmesimages" and "programmesimagescaption" classes.
* {
margin: 0px;
padding: 0px;
}
body{
background: url(../images/subtle_white_mini_waves.png) repeat;
}
#wrapper{
width:1180px;
margin: 0 auto;
overflow: hidden;
position: relative;
}
#programmescontent{
position:relative;
width:100%;
height:1000px;
background:#333;
z-index:-50;
margin-top:-73px;
}
.programmesimages{
position:relative;
width:100%;
height:600px;
background:#fff;
overflow:hidden;
}
.programmesimages img{
position: absolute;
left: 0;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
}
.programmesimagescaption{
background-color:#CF0;
position: absolute;
color: #fff;
z-index: 100;
-webkit-transition: all 300ms ease-out;
-moz-transition: all 300ms ease-out;
-o-transition: all 300ms ease-out;
-ms-transition: all 300ms ease-out;
transition: all 300ms ease-out;
width:1180px;
height:600px;
left:1180px;
}
.programmesimages:hover .programmesimagescaption{
-moz-transform: translateX(-100%);
-o-transform: translateX(-100%);
-webkit-transform: translateX(-100%);
opacity: 1;
transform: translateX(-100%);
}
.programmesimages:hover img{
-moz-transform: translateX(-100%);
-o-transform: translateX(-100%);
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
<div id="programmescontent">
<div class="programmesimages">
<img src="http://www.thevisibilityproject.com/wp-content/uploads/2014/10/TheEndAgain_288-1180x600.jpg">
<div class="programmesimagescaption">
<h3>Caption</h3>
</div>
</div>
<div id="programmescarousel">
</div>
</div>

Related

Problems with image hover zoom transition

I'm using this image zoom transition when i hover over an image. It's seems to work perfectly sometimes and sometimes it moves a little bit after zooming. I just can't figure out why..
Can anyone help me out why this happens
header {
width: 65.277777777777778%;
max-width: 1400px;
margin: 0 auto;
overflow: auto;
margin-bottom: 6%;
}
.container {
position: relative;
overflow: hidden;
/* height: 200px;
width: 200px; */
width: 100%;
}
.container img {
position: relative;
height: 100%;
width: 100%;
-webkit-transform: scale(1);
transform: scale(1);
-webkit-transition: transform;
transition: transform;
-webkit-transition-duration: 1s;
transition-duration: 1s;
display: flex;
}
.container:hover img {
-webkit-transform: scale(1.5);
transform: scale(1.5);
-webkit-transition: transform;
transition: transform;
-webkit-transition-duration: 1s;
transition-duration: 1s;
}
<header>
<div class="container">
<img src="https://pixabay.com/static/uploads/photo/2016/08/11/08/43/potatoes-1585060__340.jpg" alt="" />
</div>
</header>
Give this a try and see if it's more consistent for you. It works well for me, and I haven't noticed any issues in the months it's been implemented:
.container img {
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
.container img:hover {
-webkit-transform: scale(1.5);
-moz-transform: scale(1.5);
-ms-transform: scale(1.5);
-o-transform: scale(1.5);
transform: scale(1.5);
}
See if this does the trick, if it's something you're interested in. Either way, let me know!

CSS scale transition ease-out not working

So I've been wanting to do this scale transition on an icon on a blog. And the ease-in is working properly but not the ease-out... I read some stuff but none of them are about the scale transition so I've been having a hard time applying it to my case..
Hope you can help me thanks
Here's my code :
#avatar {
margin:auto;
margin-top:15px;
width:50px;
height:50px;
border-radius:60px;
border:0px solid {color:Main icon background};
z-index:10;
}
#avatar img {
width:100%;
height:100%;
border-radius:100%;
}
#avatar img:hover{
-webkit-transition: all 0.7s ease-in;
-moz-transition: all 0.3s ease-in;
-o-transition: all 0.3s ease-in;
transition: all 0.3s ease-in;
-ms-transform: scale(1.5, 1.5); /* IE 9 */
-webkit-transform: scale(1.5, 1.5); /* Safari */
transform: scale(1.5, 1.5);
}
<div id="avatar"><img src="https://us.123rf.com/450wm/valentint/valentint1503/valentint150302008/37824182-examples-icon-internet-button-on-colored-background.jpg?ver=6"></div>
Updated the snippet to include
#avatar img {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
To make the ease-out transition effective.
#avatar {
margin: auto;
margin-top: 15px;
width: 50px;
height: 50px;
border-radius: 60px;
border:0px solid {
color: Main icon background
}
;
z-index:10;
}
#avatar img {
width: 100%;
height: 100%;
border-radius: 100%;
}
#avatar img:hover {
-webkit-transition: all 0.7s ease-in;
-moz-transition: all 0.3s ease-in;
-o-transition: all 0.3s ease-in;
transition: all 0.3s ease-in;
-ms-transform: scale(1.5, 1.5);
/* IE 9 */
-webkit-transform: scale(1.5, 1.5);
/* Safari */
transform: scale(1.5, 1.5);
}
#avatar img {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
<div id="avatar"><img src="https://us.123rf.com/450wm/valentint/valentint1503/valentint150302008/37824182-examples-icon-internet-button-on-colored-background.jpg?ver=6"></div>

rotating div pie with transition

First I would like to explain what I want to achieve. I can't post picutes yet so I hope words will help. I have a pie with four sections.
And I want to link every of the sections with different links, and when hovering over a section, the pie should rotate. The degree of it's rotation depends on the section.
In my first attempt I tried it with imagemapping. Until I found out that they can't rotate.
After a long time of thinking I came up with this idea: Seperating my four parts, and bringing them together to a pie with four divs.
This worked and I was kinda proud, haha. Since I want the whole pie to rotate I tried this:
https://jsfiddle.net/canaika/dL569v6d/
When you hover over one of the sections a new image (the whole) pie appears, and it rotates. I wanted a smooth rotation, so I added a transition, but this ist where my problem started: yes the transition works, but it affects the come in of the image that appears, because the sections and the whole pie image have different sizes, and I can't change the sections side, otherwise the other sections are not accessible.
I hope this wasn't too confusing, maybe my idea or at least the way I tried to achieve it is dumb or impossible, but I wanted to give it a try.
#rotation1 {
background-image: url('http://www.imgbox.de/users/canaika/blue_navi.png');
height: 112px;
width: 112px;
position: fixed;
top: 100px;
left: 300px;
}
#rotation1:hover {
background-image: url('http://www.imgbox.de/users/canaika/navigation.png');
height: 224px;
width: 224px;
z-index: 1;
-webkit-transform: rotate(45deg), ;
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-o-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-khtml-transition: all 0.5s linear;
-webkit-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
}
#rotation2 {
background-image: url('http://www.imgbox.de/users/canaika/pink_navi.png');
height: 112px;
width: 112px;
position: fixed;
top: 100px;
left: 412px;
}
#rotation2:hover {
background-image: url('http://www.imgbox.de/users/canaika/navigation.png');
height: 224px;
width: 224px;
position: fixed;
top: 100px;
left: 300px;
-webkit-transform: rotate(315deg);
-moz-transform: rotate(315deg);
-o-transform: rotate(315deg);
-ms-transform: rotate(315deg);
transform: rotate(315deg);
z-index: 1;
-o-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-khtml-transition: all 0.5s linear;
-webkit-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
}
#rotation3 {
background-image: url('http://www.imgbox.de/users/canaika/yellow_navi.png');
height: 112px;
width: 112px;
position: fixed;
top: 212px;
left: 300px;
}
#rotation3:hover {
background-image: url('http://www.imgbox.de/users/canaika/navigation.png');
height: 224px;
width: 224px;
position: fixed;
top: 100px;
left: 300px;
-webkit-transform: rotate(135deg);
-moz-transform: rotate(135deg);
-o-transform: rotate(135deg);
-ms-transform: rotate(135deg);
transform: rotate(135deg);
z-index: 1;
-o-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-khtml-transition: all 0.5s linear;
-webkit-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
}
#rotation4 {
background-image: url('http://www.imgbox.de/users/canaika/green_navi.png');
height: 112px;
width: 112px;
position: fixed;
top: 212px;
left: 412px;
}
#rotation4:hover {
background-image: url('http://www.imgbox.de/users/canaika/navigation.png');
height: 224px;
width: 224px;
position: fixed;
top: 100px;
left: 300px;
-webkit-transform: rotate(225deg);
-moz-transform: rotate(225deg);
-o-transform: rotate(225deg);
-ms-transform: rotate(225deg);
transform: rotate(225deg);
z-index: 1;
-o-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-khtml-transition: all 0.5s linear;
-webkit-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
}
#zeiger {
background-image: url('http://www.imgbox.de/users/canaika/zeiger.png');
height: 35px;
width: 9px;
position: fixed;
top: 100px;
left: 407px;
z-index: 2;
}
<div id="rotation1">link 1</div>
<div id="rotation2">link 2</div>
<div id="rotation3">link 3</div>
<div id="rotation4">link 4</div>
<div id="zeiger"></div>
You need to change your transition to work only on transform not all like this :
transition: transform 0.5s linear;
not
transition: all 0.5s linear;
https://jsfiddle.net/IA7medd/dL569v6d/2/

Image flickering in Internet Explorer with transition and scale

For displaying the team members of a platform. I want to show and hide the social media icons when you hover over the image of the team member. I'm using the CSS properties transition and scale to accomplish this.
Here you can see my code: https://jsfiddle.net/johna/L9hbtqce .
(I also use Bootstrap as CSS Framework and Font Awesome for the icons.)
HTML
<div class="team-member text-center">
<div class="picture">
<img src="http://s22.postimg.org/hxl9mdjqp/member.png" class="img-responsive" alt="Ward"/>
<div class="mask">
<div class="team-member-icons">
<a target="_blank" href="#">
<i class="fa fa-facebook"></i>
</a>
<a target="_blank" href="#">
<i class="fa fa-twitter"></i>
</a>
</div>
</div>
</div>
CSS
.team-member .picture {
background-color: #f2f2f2;
border: 7px solid #dedede;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
position: relative;
width: 225px;
height: 225px;
margin: 0 auto;
border-radius: 50%;
}
.team-member .picture:hover img {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
-webkit-transform: scale(0);
transform: scale(0);
}
.team-member .picture:hover .mask {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
opacity: 1;
}
.team-member .picture:hover .mask .team-member-icons {
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
-ms-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
.team-member .picture img {
margin: 0 auto;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
-ms-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
.team-member .picture .mask {
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
-ms-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
opacity: 0;
position: absolute;
top: 0;
border-radius: 50%;
width: 100%;
height: 100%;
}
.team-member .picture .mask .team-member-icons {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
-webkit-transform: scale(0);
transform: scale(0);
display: table;
margin: 90px auto;
}
.team-member .picture .mask .team-member-icons a {
background-color: #a5a5a5;
border-radius: 50%;
display: block;
float: left;
height: 34px;
line-height: 32px;
margin: 0 5px;
width: 34px;
}
.team-member .picture .mask .team-member-icons a i {
color: #fff;
}
Everything works fine on Chrome or Firefox but on Internet Explorer (IE11) the image flickers when you "unhover" the circle with the social media icons.
Fixed my problem on Internet Explorer: https://jsfiddle.net/L9hbtqce/15/. I added an opacity of 1 to the image and an opacity of 0 when you hover over the image.
.team-member .picture {
background-color: #f2f2f2;
border: 7px solid #dedede;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
position: relative;
width: 225px;
height: 225px;
margin: 0 auto;
border-radius: 50%;
}
.team-member .picture:hover img {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
-webkit-transform: scale(0);
transform: scale(0);
opacity: 0;
}
.team-member .picture:hover .mask {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
opacity: 1;
}
.team-member .picture:hover .mask .team-member-icons {
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
-ms-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
}
.team-member .picture img {
margin: 0 auto;
width: 100%;
height: 100%;
-ms-transition: 1s;
transition: 1s;
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
.team-member .picture .mask {
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
-ms-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
opacity: 0;
position: absolute;
top: 0;
border-radius: 50%;
width: 100%;
height: 100%;
}
.team-member .picture .mask .team-member-icons {
-webkit-transition: all 0.4s ease-in-out;
-moz-transition: all 0.4s ease-in-out;
-o-transition: all 0.4s ease-in-out;
-ms-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
-webkit-transform: scale(0);
transform: scale(0);
display: table;
margin: 90px auto;
}
.team-member .picture .mask .team-member-icons a {
background-color: #a5a5a5;
border-radius: 50%;
display: block;
float: left;
height: 34px;
line-height: 32px;
margin: 0 5px;
width: 34px;
}
.team-member .picture .mask .team-member-icons a i {
color: #fff;
}

CSS - Blurry image/text when rezising

I'm making a hover effect on my website, where you hover images (pngs) and they grow in size. The problem i have is that they now get blurry when they resize.
The code that I'm using looks something like this:
.div {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
-webkit-transform: perspective(1000px) translate3d(0,0,1px);
transform: perspective(1000px) translate3d(0,0,0);
}
.div:hover {
-webkit-transform: perspective(100px) translate3d(0,0,1px);
transform: perspective(100px) translate3d(0,0,31px);
}
And you can see the effect on this jsfiddle: enter link description here
Is there a way to fix this?
I think scale would be more appropriate for this. This solution only blurs during scaling.
.square {
width:100px;
height: 100px;
background-color:black;
margin: 50px;
}
p {
color:white;
text-align: center;
padding-top: 35px;
}
.square {
-webkit-transition: -moz-transform .3s ease-out;
-moz-transition: -webkit-transform .3s ease-out;
-o-transition: -o-transform .3s ease-out;
transition: transform .3s ease-out;
}
.square:hover {
-webkit-transform: scale(2);
-moz-transform: scale(2);
-o-transform: scale(2);
transform: scale(2);
}
<div class="square">
<p>Some text</p>
</div>