CSS text transform transition - html

I would like to do an effect similar to the first part of that effect ("HOVER ME") on a div. In my case, I wanted the first text to move down and the other to appear from above when the mouse is hover the div, but without the separate letters and exactly as the first transform effect occurs. I also wanted to have a reverse transition to when the user took the mouse off the top.
My big problem is that I don't understand Haml and SASS, so I would like someone's help to develop this effect in HTML and CSS.
Haml code:
%a.h-button.centered{'data-text'=>"Hover me","href"=>"#","aria-label"=>"#{word}"}
- word.split(//).each do |letter|
%span #{letter}
SASS code:
#import url('https://fonts.googleapis.com/css?family=Roboto:900')
$letters: 6
body
background: #111
a
font-family: 'Roboto', sans-serif
font-weight: 900
color: black
text-decoration: none
.centered
position: absolute
left: 50%
top: 50%
transform: translate(-50%, -50%)
.h-button
background: white
padding: 20px
width: 250px
text-align: center
span
display: inline-block
min-width: 0.30em
text-transform: uppercase
transition: .25s cubic-bezier(0.5,-1, 0.5, 2)
opacity: 0
transform: translate(0,-20px)
&:before
content: attr(data-text)
position: absolute
width: 100%
left: 0
transition: .25s cubic-bezier(0.5,-1, 0.5, 2)
text-transform: uppercase
letter-spacing: 3.5px
opacity: 1
transform: translate(0,0px)
&:hover,&:focus
&:before
opacity: 0
transform: translate(0, 20px)
span
opacity: 1
transform: translate(0, 0)
#for $i from 1 through $letters
span:nth-child(#{$i})
transition-delay: 0.025s * $i
Example Effect

You have to compile the source to use it's content,
Here is a compiled version of your source.
#import url("https://fonts.googleapis.com/css?family=Roboto:900");
body {
background: #111;
}
a {
font-family: "Roboto", sans-serif;
font-weight: 900;
color: black;
text-decoration: none;
}
.centered {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.h-button {
background: white;
padding: 20px;
width: 250px;
text-align: center;
}
.h-button span {
display: inline-block;
min-width: 0.3em;
text-transform: uppercase;
transition: 0.25s cubic-bezier(0.5, -1, 0.5, 2);
opacity: 0;
transform: translate(0, -20px);
}
.h-button:before {
content: attr(data-text);
position: absolute;
width: 100%;
left: 0;
transition: 0.25s cubic-bezier(0.5, -1, 0.5, 2);
text-transform: uppercase;
letter-spacing: 3.5px;
opacity: 1;
transform: translate(0, 0px);
}
.h-button:hover:before, .h-button:focus:before {
opacity: 0;
transform: translate(0, 20px);
}
.h-button:hover span, .h-button:focus span {
opacity: 1;
transform: translate(0, 0);
}
.h-button:hover span:nth-child(1), .h-button:focus span:nth-child(1) {
transition-delay: 0.025s;
}
.h-button:hover span:nth-child(2), .h-button:focus span:nth-child(2) {
transition-delay: 0.05s;
}
.h-button:hover span:nth-child(3), .h-button:focus span:nth-child(3) {
transition-delay: 0.075s;
}
.h-button:hover span:nth-child(4), .h-button:focus span:nth-child(4) {
transition-delay: 0.1s;
}
.h-button:hover span:nth-child(5), .h-button:focus span:nth-child(5) {
transition-delay: 0.125s;
}
.h-button:hover span:nth-child(6), .h-button:focus span:nth-child(6) {
transition-delay: 0.15s;
}
<a aria-label='Thanks' class='h-button centered' data-text='Hover me' href='#'>
<span>T</span>
<span>h</span>
<span>a</span>
<span>n</span>
<span>k</span>
<span>s</span>
</a>

Related

Css "Glitch" animation bug

i would like to made an glitch animation in Css like this one :
Glitch working on codepen
So when i tried to do it my way, it didn't work.
Mine version
I tried to change the class into an id, i try to modify the structure but none of my changes paid off, i also try to change the structure of the html code.
``` <div class="center">
<div class="text" data-text:"Graphic Designer">
<a class="outline">Graphic</a>
<a class="inline">Designer</a>
<div class="text" data-text:"Digital Creator">
<a class="inline">Digital</a>
<a class="outline">Creator</a> </div>
```
.text {
font-family: Gotham, Helvetica Neue, Helvetica, Arial," sans-serif";
font-style: oblique ;
position: absolute;
font-size: 9vw;
font-weight: 500;
font-style: oblique ;
text-align: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
color: #fff;
white-space: nowrap;
&:before, &:after {
display: block;
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
opacity: .8;
} &:after {
color: #f0f;
z-index: -2;
} &:before {
color: #0ff;
z-index: -1;
}
&:hover {
&:before {
animation: all .3s cubic-bezier(.25, .46, .45, .94) both 5
}
&:after {
animation: all .3s cubic-bezier(.25, .46, .45, .94) reverse both 5
}
}
}
#keyframes all {
0% {
transform: translate(0)
}
20% {
transform: translate(-5px, 5px)
}
40% {
transform: translate(-5px, -5px)
}
60% {
transform: translate(5px, 5px)
}
80% {
transform: translate(5px, -5px)
}
to {
transform: translate(0)
}
}
Could anyone help me please ?
The reasons the glitch effect didn't work on your Codepen example are:
You've set up CSS tab to use CSS, but what you've written is SCSS. Click the gear icon in CSS tab and set CSS Preprocessor to SCSS
Invalid HTML markup:
You were using data-text:"Graphic Designer", but it should be data-text="Graphic Designer".
Invalid nesting: Consider using the markup below so the <div> are closed properly:
<div class="center">
<div class="text" data-text="Graphic Designer">
<a class="outline">Graphic</a>
<a class="inline">Designer</a>
</div>
<div class="text" data-text="Digital Creator">
<a class="inline">Digital</a>
<a class="outline">Creator</a>
</div>
</div>
Additionally, the effect will not properly work yet, as .text has position: absolute and you've two <div class="text">, so they'll overlap. But that is a separate question.
body {
background-color: #232323;
}
.text {
font-family: Gotham, Helvetica Neue, Helvetica, Arial," sans-serif";
font-style: oblique;
position: absolute;
font-size: 9vw;
font-weight: 500;
font-style: oblique;
text-align: center;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0;
color: #fff;
white-space: nowrap;
}
.text:before, .text:after {
display: block;
content: attr(data-text);
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
opacity: .8;
}
.text:after {
color: #f0f;
z-index: -2;
}
.text:before {
color: #0ff;
z-index: -1;
}
.text:hover:before {
animation: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both 5;
}
.text:hover:after {
animation: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both 5;
}
#keyframes all {
0% {
transform: translate(0);
}
20% {
transform: translate(-5px, 5px);
}
40% {
transform: translate(-5px, -5px);
}
60% {
transform: translate(5px, 5px);
}
80% {
transform: translate(5px, -5px);
}
to {
transform: translate(0);
}
}
<div class="center">
<div class="text" data-text="Graphic Designer">
<a class="outline">Graphic</a>
<a class="inline">Designer</a>
</div>
</div>

CSS3 animation - two issues

Here are some issues which I can't seem to figure out.
When you hover on the image I am animating a few styles but as you will see, when the border size increases, everything else moves with it.
When you change the sidetext to something longer or shorter, it decides to move positions.
Please can someone explain what I am doing wrong?
/*
Colors:
#FF0F00 = red
#FFFF04 = yellow
#387F23 = green
*/
* {
box-sizing: border-box;
}
body {
margin: 0;
background-color: yellow;
font-family: Arial, Helvetica, sans-serif;
}
.animate {
animation-fill-mode: forwards;
animation-duration: 1s;
}
.one {
-webkit-animation-delay: 0.4s;
-moz-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.two {
-webkit-animation-delay: 1.7s;
-moz-animation-delay: 1.7s;
animation-delay: 1.7s;
}
.three {
-webkit-animation-delay: 2.3s;
-moz-animation-delay: 2.3s;
animation-delay: 2.3s;
}
.four {
-webkit-animation-delay: 3.3s;
-moz-animation-delay: 3.3s;
animation-delay: 3.3s;
}
#keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn;
}
#keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -100%, 0);
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
.fadeInDown {
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
}
#keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
.fadeInLeft {
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}
/* FADE IN RIGHT */
#-webkit-keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
#keyframes fadeInRight {
from {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
}
to {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
.fadeInRight {
-webkit-animation-name: fadeInRight;
animation-name: fadeInRight;
}
.container {
margin-left: auto;
margin-right: auto;
width: 100%;
}
.hero__img img {
max-width: 100%;
vertical-align: middle;
}
.hero__center:after {
position: absolute;
content: " ";
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: red;
/* z-index: -1; */
opacity: 0;
transition: opacity 0.4s ease-in;
}
#media (min-width: 920px) {
.hero {
margin: 0 auto;
width: 700px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
opacity: 0;
}
.hero__heading {
position: absolute;
font-size: 80px;
color: #0004f3;
text-transform: uppercase;
font-weight: bold;
font-kerning: -3px;
letter-spacing: 4px;
z-index: 1;
}
.hero__heading--top {
left: -85px;
top: -150px;
opacity: 1;
}
.hero__heading--bottom {
right: -85px;
bottom: -150px;
opacity: 1;
}
.hero__center {
position: relative;
border: 5px solid blue;
transition: border 0.4s ease-in;
}
.hero__center:hover {
border: 10px solid #387F23;
transition: border 0.4s ease-in;
}
.hero__center:hover:after {
opacity: 0.4;
transition: opacity 0.4s ease-in;
}
.hero__center:hover .hero__sideText {
color: red;
transition: color 0.4s ease-in;
}
.hero__img img {
opacity: 1;
transition: opacity 0.4s ease-in;
}
/* .hero__img:hover img {
opacity: 0.4;
transition: opacity 0.4s ease-in;
} */
/* .hero__center:hover {
border: 5px solid green;
transition: border 0.5s;
} */
.hero__sideText {
position: absolute;
top: 50%;
color: #0004f3;
transition: color 0.4s ease-in;
}
.hero__side--left {
left: -50px;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
transform-origin: center center;
}
.hero__side--right {
right: -50px;
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
transform: rotate(270deg);
transform-origin: center center;
}
}
<div class="container">
<div class="hero animate fadeIn one">
<div class="hero__center">
<span class="hero__heading hero__heading--top animate fadeInLeft one">Lorem</span>
<span class="hero__heading hero__heading--bottom animate fadeInRight one">Ipsum</span>
<div class="hero__img">
<img src="http://via.placeholder.com/980x550" alt="">
</div>
<span class="hero__sideText hero__side--left">Side text</span>
<span class="hero__sideText hero__side--right">Side text</span>
</div>
</div>
</div>
Since the size of your box changes by changing the border width, the elements change their position aswell.
try adding :
.hero__center:hover {
margin:-5px;
}
to work against the border change.
2.
The transform rotation uses the center point of your element as its origin (transform-origin: center center;). When increasing the characters you increase the width so the point which the rotation choses as its origin shifts aswell.
To change that you have to fix that point to a specific location. Try adding a div wrappers around your sideText spans with the following css:
.wrapper-left {
position:relative;
left: -50%;
}
.wrapper-right {
position:relative;
left: 50%;
}

anchor tag not clickable unless absolute positioned?

I have the following HTML:
#import url(https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,700,900);
/* global css */
body {
font-size: 16px;
font-family: 'Roboto', sans-serif;
color: #fff;
padding: 0;
margin: 0;
}
.col-md-4 {
width: 33.33%;
float: left;
}
.info-boxes {
display: block;
position: relative;
background: #7accc8;
padding: 2em 0;
overflow: hidden;
text-align: center;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.info-boxes h5 {
font-size: 30px;
margin: 0;
text-transform: uppercase;
font-weight: 700;
}
.info-boxes p {
margin: 0.5em 0;
}
.info-boxes h5,
.info-boxes p {
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-transform: translateY(50%);
-ms-transform: translateY(50%);
-o-transform: translateY(50%);
transform: translateY(50%);
}
.info-boxes:hover h5,
.info-boxes:hover p {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0);
}
.info-boxes span {
display: inline-block;
font-weight: 700;
position: relative;
/* position: absolute;
bottom: 0;
left: 0;
right: 0;
*/
/*left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
-o-transform: translateX(-50%);
transform: translateX(-50%);*/
-webkit-transform: translateY(100px);
-ms-transform: translateY(100px);
-o-transform: translateY(100px);
transform: translateY(100px);
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.info-boxes:hover {
background: #f5989d;
}
.info-boxes:hover span {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0);
}
.info-boxes span:before,
.info-boxes span:after {
content: '';
position: absolute;
top: 50%;
right: 50%;
width: 100%;
height: 1px;
background: #fff;
/*-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);*/
-webkit-transition: all .3s ease .2s;
-o-transition: all .3s ease .2s;
transition: all .3s ease .2s;
opacity: 0
}
.info-boxes span:after {
right: initial;
left: 50%;
}
.info-boxes:hover span:after,
.info-boxes:focus span:after,
.info-boxes:active span:after {
left: calc(100% + 10px);
opacity: 1;
}
.info-boxes:hover span:before,
.info-boxes:focus span:before,
.info-boxes:active span:before {
right: calc(100% + 10px);
opacity: 1;
}
<a class="info-boxes">
<h5>2200AED</h5>
<p>5 Private Sessions / Validity: 2 Months</p>
<span>Online Booking</span>
</a>
Now why is the a not a anchor any more I.E. i can't click on the <a> anymore, why?
Now the one solution that I found to this was that change the container to a div tag and inside have an a and apply the following styles to it:
.info-boxes a {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 99;
}
But this is a "Why" question not a "How to solve this" question.
So what I'd like to ask is why is the <a> tag not acting like one , in this given example?
you need to add the href otherwise the a won't be clickable
if you are NOT using the href then it is considered only a placeholder hyperlink, see more here on W3C
#import url(https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,700,900);
/* global css */
body {
font-size: 16px;
font-family: 'Roboto', sans-serif;
color: #fff;
padding: 0;
margin: 0;
}
.col-md-4 {
width: 33.33%;
float: left;
}
.info-boxes {
display: block;
position: relative;
background: #7accc8;
padding: 2em 0;
overflow: hidden;
text-align: center;
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.info-boxes h5 {
font-size: 30px;
margin: 0;
text-transform: uppercase;
font-weight: 700;
}
.info-boxes p {
margin: 0.5em 0;
}
.info-boxes h5,
.info-boxes p {
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-transform: translateY(50%);
-ms-transform: translateY(50%);
-o-transform: translateY(50%);
transform: translateY(50%);
}
.info-boxes:hover h5,
.info-boxes:hover p {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0);
}
.info-boxes span {
display: inline-block;
font-weight: 700;
position: relative;
/* position: absolute;
bottom: 0;
left: 0;
right: 0;
*/
/*left: 50%;
-webkit-transform: translateX(-50%);
-ms-transform: translateX(-50%);
-o-transform: translateX(-50%);
transform: translateX(-50%);*/
-webkit-transform: translateY(100px);
-ms-transform: translateY(100px);
-o-transform: translateY(100px);
transform: translateY(100px);
-webkit-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
}
.info-boxes:hover {
background: #f5989d;
}
.info-boxes:hover span {
-webkit-transform: translateY(0);
-ms-transform: translateY(0);
-o-transform: translateY(0);
transform: translateY(0);
}
.info-boxes span:before,
.info-boxes span:after {
content: '';
position: absolute;
top: 50%;
right: 50%;
width: 100%;
height: 1px;
background: #fff;
/*-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);*/
-webkit-transition: all .3s ease .2s;
-o-transition: all .3s ease .2s;
transition: all .3s ease .2s;
opacity: 0
}
.info-boxes span:after {
right: initial;
left: 50%;
}
.info-boxes:hover span:after,
.info-boxes:focus span:after,
.info-boxes:active span:after {
left: calc(100% + 10px);
opacity: 1;
}
.info-boxes:hover span:before,
.info-boxes:focus span:before,
.info-boxes:active span:before {
right: calc(100% + 10px);
opacity: 1;
}
<a href="#" class="info-boxes">
<h5>2200AED</h5>
<p>5 Private Sessions / Validity: 2 Months</p>
<span>Online Booking</span>
</a>
A possible answer, as you don't specify if you want to go to another page or only to do something when clicking.
You should use a button tag instead. Why? Well, you should use an anchor link <a> if it goes to a page by specifing href property. If it is clickable, it has to do something BUT doesn't go to another page you should be using a button tag instead.
It may be a thing that the a doesn't have a href. I don't know if that's in the original code as well, but it seems to solve the problem.
When I add your code, which apparently solves it, it doesn't work for me, so I think you added a href when you changed the HTML.

How can I create two id tags from this script?

I want to make it so that I can have multiple buttons opening their own transition. As of now I have this code which works fine, however, if I repeat it or even change the css (class) to match an individual button, the primary button will still open the secondary transition and the newly placed secondary button remains inactive.
CSS
<style>
body,
.container,
.content-wrap {
overflow: hidden;
width: 100%;
height: 100%;
}
.container {
background: #fff;
}
.menu-wrap a {
color: #b8b7ad;
}
.menu-wrap a:hover,
.menu-wrap a:focus {
color: #c94e50;
}
.content-wrap {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.content {
position: absolute;
background: #fff;
overflow-y: visible;
}
.content::before {
position: absolute;
top: 0;
left: 0;
z-index: 10;
width: 100%;
height: 100%;
background: none;
content: '';
opacity: 0;
-webkit-transform: translate3d(100%,0,0);
transform: translate3d(100%,0,0);
-webkit-transition: opacity 0.4s, -webkit-transform 0s 0.4s;
transition: opacity 0.4s, transform 0s 0.4s;
-webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1);
transition-timing-function: cubic-bezier(0.7,0,0.3,1);
}
/* Menu Button 1 */
.menu-button {
position: absolute;
z-index: 1000;
margin: 1em;
padding: 0;
width: 10px;
height: 50px;
border: none;
text-indent: 2.5em;
font-size: 1.5em;
color: transparent;
background: transparent;
opacity: 1;
top: 510px;
left: 855px;
-ms-transform: rotate(7deg); /* IE 9 */ -webkit-transform: rotate(7deg); /* Chrome, Safari, Opera */
transform: rotate(90deg);
}
.menu-button::before {
position: absolute;
top: 0.5em;
right: 0.2em;
bottom: 0.4em;
left: -1px;
background: linear-gradient(#929292 20%, transparent 20%, transparent 40%, #929292 40%, #929292 58%, transparent 0%, transparent 80%, #929292 80%);
content: '';
}
.menu-button:hover {
opacity: 1;
}
/* Close Button */
.close-button {
width: 50px;
height: 50px;
position: absolute;
right: 1em;
top: 1em;
overflow: hidden;
text-indent: 1em;
font-size: 0.75em;
border: none;
background: transparent;
color: transparent;
opacity: 0;
}
.close-button::before,
.close-button::after {
content: '';
position: absolute;
width: 3px;
height: 100%;
top: 0;
left: 50%;
background: #bdc3c7;
}
.close-button::before {
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
.close-button::after {
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
/* Comments */
.menu-wrap {
position: absolute;
z-index: 1000;
width: 429.0500011444092px;
height: 600.875px;
right: 0;
background: #0C0C0C;
top: 6px;
padding: 0;
font-size: 1.15em;
-webkit-transform: translate3d(500px,0,0);
transform: translate3d(500px,0,0);
-webkit-transition: -webkit-transform 0.4s;
transition: transform 0.4s;
-webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1);
transition-timing-function: cubic-bezier(0.7,0,0.3,1);
}
.menu,
.icon-list {
height: 100%;
}
.icon-list {
-webkit-transform: translate3d(0,100%,0);
transform: translate3d(0,100%,0);
}
.icon-list a {
display: block;
padding: 0.8em;
-webkit-transform: translate3d(0,500px,0);
transform: translate3d(0,500px,0);
}
.icon-list,
.icon-list a {
-webkit-transition: -webkit-transform 0s 0.4s;
transition: transform 0s 0.4s;
-webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1);
transition-timing-function: cubic-bezier(0.7,0,0.3,1);
}
.icon-list a:nth-child(2) {
-webkit-transform: translate3d(0,1000px,0);
transform: translate3d(0,1000px,0);
}
.icon-list a:nth-child(3) {
-webkit-transform: translate3d(0,1500px,0);
transform: translate3d(0,1500px,0);
}
.icon-list a:nth-child(4) {
-webkit-transform: translate3d(0,2000px,0);
transform: translate3d(0,2000px,0);
}
.icon-list a:nth-child(5) {
-webkit-transform: translate3d(0,2500px,0);
transform: translate3d(0,2500px,0);
}
.icon-list a:nth-child(6) {
-webkit-transform: translate3d(0,3000px,0);
transform: translate3d(0,3000px,0);
}
.icon-list a span {
margin-left: 10px;
font-weight: 700;
}
/* Shown menu */
.show-menu .menu-wrap {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
-webkit-transition: -webkit-transform 0.8s;
transition: transform 0.8s;
-webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1);
transition-timing-function: cubic-bezier(0.7,0,0.3,1);
}
.show-menu .icon-list,
.show-menu .icon-list a {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
-webkit-transition: -webkit-transform 0.8s;
transition: transform 0.8s;
-webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1);
transition-timing-function: cubic-bezier(0.7,0,0.3,1);
}
.show-menu .icon-list a {
-webkit-transition-duration: 0.9s;
transition-duration: 0.9s;
}
.show-menu .content::before {
opacity: 1;
-webkit-transition: opacity 0.8s;
transition: opacity 0.8s;
-webkit-transition-timing-function: cubic-bezier(0.7,0,0.3,1);
transition-timing-function: cubic-bezier(0.7,0,0.3,1);
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}</style>
BEING TRANSITIONED
<div class="menu-wrap">
</div>
BUTTON
<button class="menu-button" id="open-button">Open Menu</button>
DEMO
DEMO
As you can see if you scroll towards the middle of the demo result window you will see the first button opening both transitions while the second button does nothing, I want the second button to open the bottom transition on its own.

Chrome image opacity bug [strange line appears]

I am encountering this strange bug. But only in Chrome so far. Firefox and IE11 are doing fine.
The problem is this:
When I hover over an image in my portfolio, the opacity drops from 0.7 to 0.2. When the transition is done, a strange line appears that looks like it isnt affected by the opacity attribute.
System specs:
Windows 7 Home Premium Service Pack 1 // Chrome 38.0.2125.111 m
Screen resolution: 1920 x 1080
Video card: nVidea GeForce GT650m
Here is a link to a demo site.
Here you can see the line in a screenshot:
And here is a working code snippet:
.grid figure {
position: relative;
display: inline-block;
overflow: hidden;
margin: -0.135em;
width: 33.333%;
text-align: center;
cursor: pointer;
}
.grid figure img {
position: relative;
display: block;
opacity: 0.8;
}
.grid figure figcaption {
padding: 2em;
color: #fff;
text-transform: uppercase;
font-size: 1.25em;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.grid figure figcaption::before,
.grid figure figcaption::after {
pointer-events: none;
}
.grid figure figcaption,
.grid figure a {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.grid figure a {
z-index: 1000;
text-indent: 200%;
white-space: nowrap;
font-size: 0;
opacity: 0;
}
.grid figure h2 {
word-spacing: -0.15em;
font-weight: 700;
}
.grid figure h2 span {
font-weight: 300;
margin-right: 5px;
float: left;
margin-top: -1px;
font-size: 31px;
}
.grid figure h2,
.grid figure p {
margin: 0;
}
.grid figure p {
letter-spacing: 1px;
font-size: 68.5%;
clear: left;
}
figure.effect-lily img {
width: calc(100% + 50px);
opacity: 0.7;
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
transition: opacity 0.35s, transform 0.35s;
-webkit-transform: translate3d(-40px, 0, 0);
transform: translate3d(-40px, 0, 0);
}
figure.effect-lily figcaption {
top: auto;
bottom: 0;
height: 50%;
text-align: left;
padding: 10%;
}
figure.effect-lily h2,
figure.effect-lily p {
-webkit-transform: translate3d(0, 40px, 0);
transform: translate3d(0, 40px, 0);
}
figure.effect-lily h2 {
-webkit-transition: -webkit-transform 0.35s;
transition: transform 0.35s;
}
figure.effect-lily p {
color: #fff;
opacity: 0;
-webkit-transition: opacity 0.2s, -webkit-transform 0.35s;
transition: opacity 0.2s, transform 0.35s;
font-size: 18px;
font-weight: 300;
text-transform: capitalize;
}
figure.effect-lily:hover img {
opacity: 0.2;
}
figure.effect-lily:hover p {
opacity: 0.5;
}
figure.effect-lily:hover img,
figure.effect-lily:hover h2,
figure.effect-lily:hover p {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
figure.effect-lily:hover p {
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
-webkit-transition-duration: 0.35s;
transition-duration: 0.35s;
}
figure.effect-lily p.cursive {
font-weight: 700;
}
<figure class="effect-lily double">
<img src="http://www.baasdesign.nl/projects/Bootstrap/images/5.jpg" alt="img01" />
<figcaption>
<h2><span>Stichting</span>Werkartaal</h2>
<p>Meer in reïntegratie</p>
</figcaption>
View more
</figure>
Any one ANY clue to what this could be?