Fade in Effect Image Change - html

With this code for the fade in and fade out effect how do you swap out the normal background for a jpg file? Or is there a better way to code this effect in? Im more looking for a zoom and fade effect that is used to check out the show better. I am newer to coding and am not sure! Help will be appreciated.
.image-box {
width: 300px;
overflow: hidden;
}
.image {
width: 300px;
height: 200px;
background: url("http://lorempixel.com/300/200");
background-position: center;
transition: all 10s ease;
-moz-transition: all 10s ease;
-ms-transition: all 10s ease;
-webkit-transition: all 10s ease;
-o-transition: all 10s ease;
}
.image-box:hover .image {
transform: scale(1.5);
-moz-transform: scale(1.5);
-webkit-transform: scale(1.5);
-o-transform: scale(1.5);
-ms-transform: scale(1.5);
/* IE 9 */
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand')";
/* IE8 */
filter: progid: DXImageTransform.Microsoft.Matrix(M11=1.5, M12=0, M21=0, M22=1.5, SizingMethod='auto expand');
/* IE6 and 7 */
}
.image-box, .image {
position: relative;
}
.image:after {
content: '';
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
background-color: red;
transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-webkit-transition: all 1s ease;
-o-transition: all 1s ease;
}
.label {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 25px;
font-weight: bolder;
}
.image-box:hover .image:after {
opacity: 0.5;
}
<div class="image-box">
<div class="image"></div>
<div class="label">LABEL</div>
</div>

Related

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/

CSS 3 Rotate Animation on hover [duplicate]

This question already has answers here:
Spin or rotate an image on hover
(5 answers)
Closed 7 years ago.
I have this code to make a rotation on hover. It doesn't work at all. What's is wrong with it?
I need the complete animation of the rotation for 360ยบ
.icon-style-1 .builder-element-icon {
height: 100px;
width: 100px;
line-height: 100px;
background: blue;
line-height: 100px;
text-align: center;
margin: 0 auto;
display: block;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
color: white;
}
.icon-style-1 .builder-element-icon:hover {
background: green;
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
<div class="icon-style-1">
<span class="builder-element-icon fa fa-camera"></span>
</div>
So here you go with transition on normal element style and rotate added on hover and External DEMO HERE
.icon-style-1 .builder-element-icon{
height: 100px;
width: 100px;
line-height: 100px;
background: blue;
line-height: 100px;
text-align: center;
margin: 0 auto;
display: block;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
color: white;
/* Firefox */
-moz-transition: all 1s ease;
/* WebKit */
-webkit-transition: all 1s ease;
/* Opera */
-o-transition: all 1s ease;
/* Standard */
transition: all 1s ease;
}
.icon-style-1 .builder-element-icon:hover{
background: green;
/* Firefox */
-moz-transform: rotate(360deg) ;
/* WebKit */
-webkit-transform: rotate(360deg);
/* Opera */
-o-transform: rotate(360deg) ;
/* Standard */
transform: rotate(360deg) ;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<div class="icon-style-1">
<div class="builder-element-icon glyphicon glyphicon-camera">
</div>
</div>
360 degrees rotates it back to its original place. you probably wanted it to be 180deg;
if you want it animatad, you need to add a transition:
.icon-style-1 .builder-element-icon{
height: 100px;
width: 100px;
line-height: 100px;
background: blue;
line-height: 100px;
text-align: center;
margin: 0 auto;
display: block;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
color: white;
-moz-transition: -moz-transform ease 0.6s;
-webkit-transition: -webkit-transform ease 0.6s;
-o-transition: -o-transform ease 0.6s;
-ms-transition: -ms-transform ease 0.6s;
transition: transform ease 0.6s;
}
.icon-style-1 .builder-element-icon:hover{
background: green;
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
<div class="icon-style-1">
<span class="builder-element-icon fa fa-camera">a</span>
</div>
and in case you want to animate the background color to, you could replace transition: transform ease 0.6s; withe either
transition: transform ease 0.6s, background ease 0.6s;
or
transition: all ease 0.6s;
You can use CSS3 transitions in order to achieve this result.
Just move your mouse over the label.
#rotatable {
font-size: 30px;
}
#rotatable:hover {
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
<span id="rotatable">I can rotate!</span>
You forgot to add CSS Transitions. Also, you don't need to use -moz, -ms and -o vendor prefixes now, see Can I Use:
JSFiddle
.icon-style-1 .builder-element-icon {
height: 100px;
width: 100px;
line-height: 100px;
background: blue;
text-align: center;
margin: 0 auto;
display: block;
border-radius: 50%;
color: white;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.icon-style-1 .builder-element-icon:hover {
background: green;
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="icon-style-1">
<span class="builder-element-icon fa fa-camera"></span>
</div>

Z-Index issue in my CSS

so I am working on creating a new portfolio for myself and I have just hit a little wall with a CSS issue while trying to style my social icons a certain way. The desired effect I am going for can be seen here: My Social Icons Demo. However, if you view my portfolio, here, you can see that I'm not quite getting the same effect (note: my social icons are located in the top and bottom left corners of the page). I can't seem to get the white background behind my social icon images to transition in. I think this may have to do with a z-index error that is possibly conflicting with something else on my portfolio page but as of right now I am stuck.. any ideas?? Would greatly appreciate it! Code below:
HTML
<!-- SOCIAL -->
<div class="col-sm-4 text-left">
<div class="social-icons">
<a href="https://github.com/jlquaccia" target="_blank" class="me-transparent-btn">
<img src="./img/icons/github-6-48.png" alt="Github">
</a>
<a href="https://www.linkedin.com/profile/view?id=227782654&trk=nav_responsive_tab_profile" target="_blank" class="me-transparent-btn">
<img src="./img/icons/linkedin-48.png" alt="LinkedIn">
</a>
<a href="http://instagram.com/jquatchaa" target="_blank" class="me-transparent-btn">
<img src="./img/icons/twitter-48.png" alt="Instagram">
</a>
</div>
</div>
CSS
.hero {
background-image: url(../img/star_trails_2_large.jpg);
background-attachment: fixed;
background-size: cover;
}
.social-icons {
margin-top: 41px;
a {
display: inline-block;
width: 50px;
height: 50px;
border: 1px solid #fff;
margin: 5px;
padding: 0;
position: relative;
cursor: pointer;
img {
-webkit-filter: invert(100%);
-moz-filter: invert(100%);
-ms-filter: invert(100%);
-o-filter: invert(100%);
filter: invert(100%);
vertical-align: bottom;
display: inline-block;
-webkit-transform: scale(.7);
-moz-transform: scale(.7);
-ms-transform: scale(.7);
-o-transform: scale(.7);
transform: scale(.7);
-webkit-transition: all 400ms ease;
-moz-transition: all 400ms ease;
-ms-transition: all 400ms ease;
-o-transition: all 400ms ease;
transition: all 400ms ease;
}
&:hover img {
-webkit-filter: invert(0%);
-moz-filter: invert(0%);
-ms-filter: invert(0%);
-o-filter: invert(0%);
filter: invert(0%);
-webkit-transform: scale(.8);
-moz-transform: scale(.8);
-ms-transform: scale(.8);
-o-transform: scale(.8);
transform: scale(.8);
}
&:after {
content: '';
background: #fff;
position: absolute;
width: 0;
height: 103%;
opacity: .5;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-ms-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
left: 50%;
top: 50%;
z-index: -1;
-webkit-transform: translateX(-50%) translateY(-50%);
-moz-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
-o-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
}
&:hover:after {
opacity: 1;
width: 105%;
}
}
}
.no_margin {
margin: 50px 0;
}
.img-responsive-center {
display: inline-block;
padding-top: 75px;
}
.inner {
padding-bottom: 100px;
span {
color: #EF3D33;
}
}
.text-center {
h2 {
color: white;
}
}
.delay-05s {
-webkit-animation-delay: 0.5s;
animation-delay: 0.5s;
}
.delay-1s {
-webkit-animation-delay: 1s;
animation-delay: 1s;
}
.delay-3s {
-webkit-animation-delay: 3s;
animation-delay: 3s;
}
#media (max-width: 767px) {
.social {
display: none;
}
.img-responsive-center {
padding-top: 100px;
}
}
.down-btn {
width: 60px;
height: 60px;
background-color: $down-btn-bg;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
color: #fff;
font-size: 20px;
line-height: 60px;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
&:hover,
&:focus {
background-color: $down-btn-hover-focus;
color: #fff;
}
}
.down-btn-padding {
padding-bottom: 80px;
}
Add to your div.social-icons position:relative; z-index:1; and this should solve your issue.

Internet Explorer 8 doesn't support my design

I have recently designed a site. But problem is in only Internet Explorer 8. Other browsers detect no problem. Problem is only on hover effect.
My style.css file:
/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/
/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */
html,
button,
input,
select,
textarea {
color: #222;
}
html {
font-size: 1em;
line-height: 1.4;
}
/*
* Remove text-shadow in selection highlight: h5bp.com/i
* These selection rule sets have to be separate.
* Customize the background color to match your design.
*/
::-moz-selection {
background: #b3d4fc;
text-shadow: none;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
/*
* A better looking default horizontal rule
*/
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
/*
* Remove the gap between images, videos, audio and canvas and the bottom of
* their containers: h5bp.com/i/440
*/
audio,
canvas,
img,
video {
vertical-align: middle;
}
/*
* Remove default fieldset styles.
*/
fieldset {
border: 0;
margin: 0;
padding: 0;
}
/*
* Allow only vertical resizing of textareas.
*/
textarea {
resize: vertical;
}
/* ==========================================================================
Browse Happy prompt
========================================================================== */
.browsehappy {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
/* ==========================================================================
Author's custom styles
========================================================================== */
/* ==========================================================================
Helper classes
========================================================================== */
/*
* Image replacement
*/
.ir {
background-color: transparent;
border: 0;
overflow: hidden;
/* IE 6/7 fallback */
*text-indent: -9999px;
}
.ir:before {
content: "";
display: block;
width: 0;
height: 150%;
}
/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
display: none !important;
visibility: hidden;
}
/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
/*
* Extends the .visuallyhidden class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
visibility: hidden;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.clearfix:after {
clear: both;
}
/*
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.clearfix {
*zoom: 1;
}
/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */
#media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}
#media print,
(-o-min-device-pixel-ratio: 5/4),
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 120dpi) {
/* Style adjustments for high resolution devices */
}
/* ==========================================================================
Print styles.
Inlined to avoid required HTTP connection: h5bp.com/r
========================================================================== */
#media print {
* {
background: transparent !important;
color: #000 !important; /* Black prints faster: h5bp.com/s */
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
/*
* Don't show links for images, or javascript/internal links
*/
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group; /* h5bp.com/t */
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
#page {
margin: 0.5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
/*stylesheet*/
body{
font-size:14px;
line-height:18px;
color:#fff;
background:#C9C6C5;
}
.wrapper {
}
/*header*/
.header_area {
background: url("../img/header_bg.png") repeat scroll 0 0 rgba(0, 0, 0, 0);
}
.header_area:after {
background: url("../img/shadows.png") repeat scroll 0 0 rgba(0, 0, 0, 0);
content: "";
display: block;
height: 13px;
width: 100%;
}
.header {
margin: 0 auto;
overflow: hidden;
padding: 30px 0 40px;
width: 1000px;
}
.logo,.slogan{
float: left;
}
.logo img{width:260px;}
.main_slogan > img {
width: 350px;
margin-left: 32px;
}
.tel {
margin-left: 280px;
overflow: hidden;
}
.tel li {
background: #535353;
float: left;
margin-right: 10px;
padding: 5px 5px 5px 0;
}
.tel span {
background: none repeat scroll 0 0 #2b2b2b;
padding: 6px;
}
.social {float: right;
margin-top: 21px;}
.social li {
float: left;
}
.social li:hover {
opacity: .6;
filter: alpha(opacity=60);
}
.social li img {
width: 48px;
}
.header ul{
margin:0;
padding:0;
list-style:none;
}
/* menu */
.menu {
background: none repeat scroll 0 0 #2b2b2b;
margin: 0 auto;
min-height: 50px;
width: 1000px;
}
.menu ul {
margin: 0;
padding: 0;
list-style: none;
z-index:9999;
}
.menu ul li {
background: none repeat scroll 0 0 #2b2b2b;
border-left: 1px solid #1b1a1a;
border-right: 1px solid #373636;
display: block;
float: left;
padding: 16px 15px;
text-transform: uppercase;
position:relative;
}
.menu ul li:first-child{border-left:0}
.menu ul li:last-child{border-right:0}
.menu ul li a {
color: #fff;
font-family: keron;
font-size: 13px;
line-height: 16px;
text-decoration: none;
}
.menu ul li:hover{background:#B70C0F; -webkit-transition: all .5s; transition: all .5s;}
/*dropdown menu*/
.menu ul ul,.menu ul ul ul{display:none;}
.menu ul li:hover>ul{display:block;}
.menu ul ul{
left: 0;
position: absolute;
top: 50px;
width: 170px;
}
.menu ul ul li{float:none;
border-left: 0px solid #1b1a1a;
border-right: 0px solid #373636;
border-top: 1px solid #1b1a1a;
border-bottom: 1px solid #373636;
position:relative;
}
.menu ul ul li:first-child{border-top:0}
.menu ul ul li:last-child{border-bottom:0}
.menu ul ul li:hover ul{display:block}
.menu ul ul ul{
left: 170px;
position: absolute;
top: 0;
}
.content_box_area{background:#C9C6C5;}
.content_area {
overflow: hidden;
margin: 0 auto;
width: 1000px;
}
.image_box {
overflow: hidden;
}
.image_box {
overflow: hidden;
padding: 45px 0 0;
}
/*another source*/
.view {
margin: 10px;
float: left;
overflow: hidden;
position: relative;
text-align: center;
box-shadow: 1px 1px 2px #e6e6e6;
cursor: default;
background: #fff url(../images/bgimg.jpg) no-repeat center center;
}
.view .mask,.view .content {
left: 0;
overflow: hidden;
position: absolute;
top: 0;
width: 100%;
height: 100%;
}
.view img {
display: block;
position: relative;
}
.view p {
font-family: Georgia, serif;
font-style: italic;
font-size: 12px;
position: relative;
color: #fff;
padding: 10px 20px 20px;
text-align: center;
}
.view-fifth img {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.view-fifth .mask {
background-color: rgba(146,96,91,0.3);
-webkit-transform: translateX(-300px);
-moz-transform: translateX(-300px);
-o-transform: translateX(-300px);
-ms-transform: translateX(-300px);
transform: translateX(-300px);
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.view-fifth h2 {
background: rgba(255, 255, 255, 0.5);
color: #000;
-webkit-box-shadow: 0px 1px 3px rgba(159, 141, 140, 0.5);
-moz-box-shadow: 0px 1px 3px rgba(159, 141, 140, 0.5);
box-shadow: 0px 1px 3px rgba(159, 141, 140, 0.5);
}
.view-fifth p {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
color: #333;
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
transition: all 0.2s linear;
}
.view-fifth:hover .mask {
-webkit-transform: translateX(0px);
-moz-transform: translateX(0px);
-o-transform: translateX(0px);
-ms-transform: translateX(0px);
transform: translateX(0px);
}
.view-fifth:hover img {
-webkit-transform: translateX(300px);
-moz-transform: translateX(300px);
-o-transform: translateX(300px);
-ms-transform: translateX(300px);
transform: translateX(300px);
}
.view-fifth:hover p {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.view-seventh img {
-webkit-transition: all 0.5s ease-out;
-moz-transition: all 0.5s ease-out;
-o-transition: all 0.5s ease-out;
-ms-transition: all 0.5s ease-out;
transition: all 0.5s ease-out;
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.view-seventh .mask {
background-color: rgba(77,44,35,0.5);
-webkit-transform: rotate(0deg) scale(1);
-moz-transform: rotate(0deg) scale(1);
-o-transform: rotate(0deg) scale(1);
-ms-transform: rotate(0deg) scale(1);
transform: rotate(0deg) scale(1);
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
-webkit-transition: all 0.3s ease-out;
-moz-transition: all 0.3s ease-out;
-o-transition: all 0.3s ease-out;
-ms-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.view-seventh h2 {
-webkit-transform: translateY(-200px);
-moz-transform: translateY(-200px);
-o-transform: translateY(-200px);
-ms-transform: translateY(-200px);
transform: translateY(-200px);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.view-seventh p {
-webkit-transform: translateY(-200px);
-moz-transform: translateY(-200px);
-o-transform: translateY(-200px);
-ms-transform: translateY(-200px);
transform: translateY(-200px);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.view-seventh a.info {
-webkit-transform: translateY(-200px);
-moz-transform: translateY(-200px);
-o-transform: translateY(-200px);
-ms-transform: translateY(-200px);
transform: translateY(-200px);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.view-seventh:hover img {
-webkit-transform: rotate(720deg) scale(0);
-moz-transform: rotate(720deg) scale(0);
-o-transform: rotate(720deg) scale(0);
-ms-transform: rotate(720deg) scale(0);
transform: rotate(720deg) scale(0);
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
}
.view-seventh:hover .mask {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
-webkit-transform: translateY(0px) rotate(0deg);
-moz-transform: translateY(0px) rotate(0deg);
-o-transform: translateY(0px) rotate(0deg);
-ms-transform: translateY(0px) rotate(0deg);
transform: translateY(0px) rotate(0deg);
-webkit-transition-delay: 0.4s;
-moz-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
-ms-transition-delay: 0.4s;
transition-delay: 0.4s;
}
.view-seventh:hover h2 {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
-webkit-transition-delay: 0.7s;
-moz-transition-delay: 0.7s;
-o-transition-delay: 0.7s;
-ms-transition-delay: 0.7s;
transition-delay: 0.7s;
}
.view-seventh:hover p {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
-webkit-transition-delay: 0.6s;
-moz-transition-delay: 0.6s;
-o-transition-delay: 0.6s;
-ms-transition-delay: 0.6s;
transition-delay: 0.6s;
}
.view-seventh:hover a.info {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
-webkit-transition-delay: 0.5s;
-moz-transition-delay: 0.5s;
-o-transition-delay: 0.5s;
-ms-transition-delay: 0.5s;
transition-delay: 0.5s;
}
.view-eighth .mask {
background-color: rgba(255, 255, 255, 0.7);
top: -200px;
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
-webkit-transition: all 0.3s ease-out 0.5s;
-moz-transition: all 0.3s ease-out 0.5s;
-o-transition: all 0.3s ease-out 0.5s;
-ms-transition: all 0.3s ease-out 0.5s;
transition: all 0.3s ease-out 0.5s;
}
.view-eighth h2 {
-webkit-transform: translateY(-200px);
-moz-transform: translateY(-200px);
-o-transform: translateY(-200px);
-ms-transform: translateY(-200px);
transform: translateY(-200px);
-webkit-transition: all 0.2s ease-in-out 0.1s;
-moz-transition: all 0.2s ease-in-out 0.1s;
-o-transition: all 0.2s ease-in-out 0.1s;
-ms-transition: all 0.2s ease-in-out 0.1s;
transition: all 0.2s ease-in-out 0.1s;
}
.view-eighth p {
color: #333;
-webkit-transform: translateY(-200px);
-moz-transform: translateY(-200px);
-o-transform: translateY(-200px);
-ms-transform: translateY(-200px);
transform: translateY(-200px);
-webkit-transition: all 0.2s ease-in-out 0.2s;
-moz-transition: all 0.2s ease-in-out 0.2s;
-o-transition: all 0.2s ease-in-out 0.2s;
-ms-transition: all 0.2s ease-in-out 0.2s;
transition: all 0.2s ease-in-out 0.2s;
}
.view-eighth a.info {
-webkit-transform: translateY(-200px);
-moz-transform: translateY(-200px);
-o-transform: translateY(-200px);
-ms-transform: translateY(-200px);
transform: translateY(-200px);
-webkit-transition: all 0.2s ease-in-out 0.3s;
-moz-transition: all 0.2s ease-in-out 0.3s;
-o-transition: all 0.2s ease-in-out 0.3s;
-ms-transition: all 0.2s ease-in-out 0.3s;
transition: all 0.2s ease-in-out 0.3s;
}
.view-eighth:hover .mask {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
top: 0px;
-webkit-transition-delay: 0s;
-moz-transition-delay: 0s;
-o-transition-delay: 0s;
-ms-transition-delay: 0s;
transition-delay: 0s;
-webkit-animation: bounceY 0.9s linear;
-moz-animation: bounceY 0.9s linear;
-ms-animation: bounceY 0.9s linear;
animation: bounceY 0.9s linear;
}
.view-eighth:hover h2 {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
-webkit-transition-delay: 0.4s;
-moz-transition-delay: 0.4s;
-o-transition-delay: 0.4s;
-ms-transition-delay: 0.4s;
transition-delay: 0.4s;
}
.view-eighth:hover p {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
-webkit-transition-delay: 0.2s;
-moz-transition-delay: 0.2s;
-o-transition-delay: 0.2s;
-ms-transition-delay: 0.2s;
transition-delay: 0.2s;
}
.view-eighth:hover a.info {
-webkit-transform: translateY(0px);
-moz-transform: translateY(0px);
-o-transform: translateY(0px);
-ms-transform: translateY(0px);
transform: translateY(0px);
-webkit-transition-delay: 0s;
-moz-transition-delay: 0s;
-o-transition-delay: 0s;
-ms-transition-delay: 0s;
transition-delay: 0s;
}
#keyframes bounceY {
0% { transform: translateY(-205px);}
40% { transform: translateY(-100px);}
65% { transform: translateY(-52px);}
82% { transform: translateY(-25px);}
92% { transform: translateY(-12px);}
55%, 75%, 87%, 97%, 100% { transform: translateY(0px);}
}
#-moz-keyframes bounceY {
0% { -moz-transform: translateY(-205px);}
40% { -moz-transform: translateY(-100px);}
65% { -moz-transform: translateY(-52px);}
82% { -moz-transform: translateY(-25px);}
92% { -moz-transform: translateY(-12px);}
55%, 75%, 87%, 97%, 100% { -moz-transform: translateY(0px);}
}
#-webkit-keyframes bounceY {
0% { -webkit-transform: translateY(-205px);}
40% { -webkit-transform: translateY(-100px);}
65% { -webkit-transform: translateY(-52px);}
82% { -webkit-transform: translateY(-25px);}
92% { -webkit-transform: translateY(-12px);}
55%, 75%, 87%, 97%, 100% { -webkit-transform: translateY(0px);}
}
.view-tenth img {
-webkit-transform: scaleY(1);
-moz-transform: scaleY(1);
-o-transform: scaleY(1);
-ms-transform: scaleY(1);
transform: scaleY(1);
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
-ms-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
}
.view-tenth .mask {
background-color: rgba(255, 231, 179, 0.3);
-webkit-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-o-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
}
.view-tenth h2 {
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
background: transparent;
margin: 20px 40px 0px 40px;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
color: #333;
-webkit-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-o-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
}
.view-tenth p {
color: #333;
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-o-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
}
.view-tenth a.info {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
-webkit-transform: scale(0);
-moz-transform: scale(0);
-o-transform: scale(0);
-ms-transform: scale(0);
transform: scale(0);
-webkit-transition: all 0.5s linear;
-moz-transition: all 0.5s linear;
-o-transition: all 0.5s linear;
-ms-transition: all 0.5s linear;
transition: all 0.5s linear;
}
.view-tenth:hover img {
-webkit-transform: scale(10);
-moz-transform: scale(10);
-o-transform: scale(10);
-ms-transform: scale(10);
transform: scale(10);
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity: 0;
}
.view-tenth:hover .mask {
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
.view-tenth:hover h2,.view-tenth:hover p,.view-tenth:hover a.info {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-o-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
opacity: 1;
}
/*end*/
.box {
overflow: hidden;
margin: 3px;
}
.box img {
height: 100%;
width: 100%;
}
.box_part_one {
float: left;
overflow: hidden;
width: 450px;
}
.box.box1 {
float: left;
height: 255px;
width: 192px;
}
.box.box2 {
float: left;
height: 130px;
width: 120px;
}
.box.box3 {
float: right;
height: 130px;
width: 120px;
}
.box.box4,.box.box5 {
float: left;
height: 120px;
width: 120px;
}
.box.box5 {position:relative;
overflow:hidden;}
.comment_heading{
background-color: rgba(0, 0, 0, 0.75);
border-radius: 5px;
box-shadow: 0 0 15px 2px rgba(255, 255, 255, 0.75);
display: none;
font-size: 15px;
height: 100%;
left: 0;
padding: 25px;
position: absolute;
top: 0;
width: 100%;
}
.box.box5:hover .comment_heading{display:block;}
.box_part_two {
float: right;
width: 550px;
}
.box.box6 {
float: left;
height: 255px;
width: 190px;
}
.box.box7 {
float: left;
height: 120px;
width: 216px;
}
.box.box8 {
float: left;
height: 120px;
width: 126px;
}
.box.box9 {
float: left;
height: 130px;
width: 123px;
}
.box.box10 {
float: right;
height: 130px;
width: 219px;
}
.box.box2:hover img,.box.box9:hover img{
-webkit-transform: rotateY(180deg); -webkit-transform-style: preserve-3d; -webkit-transform: rotateY(180deg); transform: rotateY(180deg); -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.box.box3:hover img{
-webkit-transform: scale(1.4); -webkit-transform-style: preserve-3d; -webkit-transform: scale(1.4); transform: scale(1.4); -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.box.box4:hover img{
-webkit-transform: scale(.8); -webkit-transform-style: preserve-3d; -webkit-transform: scale(.8); transform: scale(.8); -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.box.box6:hover img{
-webkit-transform: scale(1.4); -webkit-transform-style: preserve-3d; -webkit-transform: scale(1.4); transform: scale(1.4); -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.box.box2, .box.box2:hover img,.box.box3:hover img,.box.box4:hover img,.box.box9:hover img,.box.box5:hover .comment_heading {
-webkit-transition: all 0.7s ease; transition: all 0.7s ease;
}
my link:
http://www.mytechbd.com/demo-content
How many of your site visitors do you expect to be using IE8?
google, Facebook and a few other high volume website are only supporting the last 3 versions of vendor's browsers and redirect IE8 users to update their webbrowser version...
To provide backward compatibility for the :hover pseudoclass for IE8 you need to use a 'shim' like jquery plugins.
web search or hover shim for IE8
or provide a fallback using the onmouseover event handlers instead of the :hover pseudoclass.
hover shim for IE8 and lower

CSS3 animation only works on the first hover

I am building a website and i am attempting to animate a :hover of a div so that when a mouse hovers over it another div that is currently at opacity:0 will increase its opacity to 0.8 over the span of 3.5 seconds while concurrently fading down into place.
This will work properly until the second time that i try it and then it will not fade back to 0 opacity when i leave the object with my mouse. The object will stay visible with opacity 0.8.
Hopefully i am making sense.
The fade animations are pulled from Animate.css and inserted directly into my css.
All of my code pertaining to this issue can be found here
.widget-Button4.widget-header.widget-html-widget.widget p
{
background:none;
height: 50px;
position: absolute;
top: 250px;
left: 1000px;
}
#Hosting
{
background-image: url("images/header_rollout_expandedbg.png");
background-size:100%;
background-repeat:no-repeat;
margin: 0 0 1em;
font-size: 11px;
line-height: 1.538em;
float: left;
padding: 20px 14px 14px 14px;
position: absolute;
top: 274px;
left: 909px;
z-index: 0;
-webkit-animation:fadeOutUp 3.5s; /* Chrome, Safari, Opera */
animation:fadeOutUp 3.5s;
-webkit-transition: opacity 3.5s ease-in-out;
-moz-transition: opactiy 3.5s ease-in-out;
-ms-transition: opacity 3.5s ease-in-out;
-o-transition: opacity 3.5s ease-in-out;
transition: opacity 3.5s ease-in-out;
filter: alpha(opacity=0);
opacity: 0;
}
#HostingButton
{
background-image: url("images/header_rolloutbg_static_complete.png");
background-size:100%;
background-repeat:no-repeat;
height: 20px;
width: 20px;
position: absolute;
top: 263px;
left: 1007px;
-webkit-transition: all 3.5s ease-in-out;
-moz-transition: all 3.5s ease-in-out;
-o-transition: all 3.5s ease-in-out;
-ms-transition: all 3.5s ease-in-out;
z-index: 50;
}
#HostingButton:hover
{
-webkit-transform: rotate(1080deg);
-moz-transform: rotate(1080deg);
-o-transform: rotate(1080deg);
-ms-transform: rotate(1080deg);
}
#HostingButton:hover + #Hosting
{
-webkit-animation:fadeInDown 3.5s; /* Chrome, Safari, Opera */
animation:fadeInDown 3.5s;
transition: none;
-o-transition: none;
-ms-transition: none;
-moz-transition: none;
-webkit-transition: none;
filter: alpha(opacity=80);
opacity: 0.8;
}
#-webkit-keyframes fadeInDown
{
0%
{
opacity: 0;
-webkit-transform: translateY(-20px);
-ms-transform: translateY(-20px);
transform: translateY(-20px);
}
100%
{
opacity: 1;
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
#keyframes fadeInDown
{
0%
{
opacity: 0;
-webkit-transform: translateY(-20px);
-ms-transform: translateY(-20px);
transform: translateY(-20px);
}
100%
{
opacity: 1;
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
}
#-webkit-keyframes fadeOutUp
{
0%
{
opacity: 1;
-webkit-transform: translateY(0);
transform: translateY(0);
}
100%
{
opacity: 0;
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
}
}
#keyframes fadeOutUp
{
0%
{
opacity: 1;
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
transform: translateY(0);
}
100%
{
opacity: 0;
-webkit-transform: translateY(-20px);
-ms-transform: translateY(-20px);
transform: translateY(-20px);
}
}
And the HTML to go along with it here
<p>
Hosting
</p>
<div id="HostingButton">
</div>
<div id="Hosting">
<div id="rollouttext">
Hello
</div>
</div>
I managed to get the opacity part of it that i am having trouble with working in JSFiddle.
http://jsfiddle.net/7uR8z/1499/
It is the same code that i am using however, i think i might have some conflict and i am having a hell of a time trying to figure it out.
Any help would be appreciated!
How you are describing it is where there are 2 divs. The first div is visible and the second div is 0 opacity. When you hover the first div is 0 opacity and the second div is 80% opacity. This happens over 3.5 seconds.
I made the 2 states in different divs .item and .description. Not too sure why you had zoom in there? Let me know if this is not what you're trying to do.
.container {
height:200px;
width:200px;
position:relative;
}
.item {
height:200px;
width:200px;
position:absolute;
background:red;
-webkit-transition: opacity 3.5s ease-in;
-moz-transition: opactiy 3.5s ease-in;
-ms-transition: opacity 3.5s ease-in;
-o-transition: opacity 3.5s ease-in;
transition: opacity 3.5s ease-in;
filter: alpha(opacity=100);
opacity: 1;
}
.item:hover {
filter: alpha(opacity=0);
opacity: 0;
}
.descriton {
position:absolute;
height:200px;
width:200px;
background:green;
display:visible;
-webkit-transition: opacity 3.5s ease-in;
-moz-transition: opactiy 3.5s ease-in;
-ms-transition: opacity 3.5s ease-in;
-o-transition: opacity 3.5s ease-in;
transition: opacity 3.5s ease-in;
filter: alpha(opacity=0);
opacity: 0;
}
.descriton:hover {
filter: alpha(opacity=80);
opacity: 0.8;
}
Check out the demo jsfiddle