I used a tutorial on creating a 3D flip down sub-menu.
Files found here:
Flip Up Down Menu (Zip File)
http://www.webdesignermag.co.uk/tutorial-files/issue-217-tutorial-files/
I modified to my usage and works great.
Here is the fiddle:
http://jsfiddle.net/yx8qc/6/
Here is the code:
<div class="menu_holder">
<ul class="nav">
<li class="main_menu">MENU
<div class="sub">
<ul><li>Home</li>
<li>ONE</li>
<li>TWO</li>
<li>THREE</li>
</ul> </div>
</li>
</ul>
</div>
Here is the CSS
.menu_holder {
background-color: #bd4832;
text-align: center;
-moz-perspective: 80px;
-webkit-perspective: 80px;
-o-perspective: 80px;
perspective: 80px;
position: fixed;
right: 0;
top: 0;
height: 64px;
z-index: 900;
width: 100%;
}
.menu_holder ul {
padding: 0;
margin: 0;
}
.menu_holder a {
color: #fff;
font-family:'League Gothic', sans-serif;
font-size: 2em;
font-weight: normal;
}
.menu_holder ul li {
display: inline;
}
.main_menu {
width: 100%;
}
ul.nav li a {
display: inline-block;
padding: 0 1em;
letter-spacing: 2px;
}
.menu_holder ul.nav {
-moz-transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.sub {
}
.menu_holder ul.nav div {
width: 100%;
position:absolute;
background-color: #d3634e;
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
transition: 0.3s;
-moz-transform-origin: 0px 0px;
-moz-transform: rotateX(-90deg);
-webkit-transform-origin: 0px 0px;
-webkit-transform: rotateX(-90deg);
-o-transform-origin: 0px 0px;
-o-transform: rotateX(-90deg);
transform-origin: 0px 0px;
transform: rotateX(-90deg);
-moz-backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
-moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55);
/* inner shadow */
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55);
/* inner shadow */
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .55);
/* inner shadow */
}
.menu_holder ul.nav li:hover div {
-moz-transform: rotateX(0deg);
-webkit-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
transform: rotateX(0deg);
}
.menu_holder ul.nav li:hover > a {
color:#115b64;
}
.menu_holder ul.nav div.sub {
width: 100%;
display: block;
}
When hovered it flips down, when hovered out flips back up.
On desktop it works great.
On touch devices, the menu flips down, but in order for it to flip back up you have to touch outside the main link.
Goal:
To get it working with touch devices. Tapping "Menu" will drop sub-menu down. Tap SAME main "Menu" item will flip it back.
Any help or leads with touch devices is greatly appreciated.
Thank You.
Does this works? I don't have here any touch device.
HTML
<div class="menu_holder">
<ul class="nav">
<li class="main_menu"><label for="toggle-1">MENU</label>
<input type="checkbox" id="toggle-1">
<div class="sub">
<ul>
<li>Home
</li>
<li>ONE
</li>
<li>TWO
</li>
<li>THREE
</li>
</ul>
</div>
</li>
</ul>
</div>
CSS (Yours + this)
input[type=checkbox] {
position: absolute;
top: -9999px;
left: -9999px;
}
label {
cursor: pointer;
}
input[type=checkbox]:checked ~ div {
-moz-transform: rotateX(0deg);
-webkit-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
transform: rotateX(0deg);
}
And here is demo: http://jsfiddle.net/yx8qc/7/
This will simply use label to activate checkbox, and in function of its state show or hide content.
Related
I found a pure CSS mobile burger menu solution on codepen, and I altered the code with
transform: translate(-200%, 0);
/* Mobile Menu */
#menuToggle {
display: block;
position: relative;
top: 10px;
left: 50%;
z-index: 1;
-webkit-user-select: none;
user-select: none;
}
#menuToggle a {
text-decoration: none;
color: #232323;
transition: color 0.3s ease;
}
#menuToggle a:hover {color: tomato;}
#menuToggle input {
display: block;
width: 40px;
height: 32px;
position: absolute;
top: -7px;
left: -5px;
cursor: pointer;
opacity: 0; /* hide this */
z-index: 2; /* and place it over the hamburger */
-webkit-touch-callout: none;
}
#menuToggle span {
display: block;
width: 33px;
height: 4px;
margin-bottom: 5px;
position: relative;
background: #cdcdcd;
border-radius: 3px;
z-index: 1;
transform-origin: 4px 0px;
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), background 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0), opacity 0.55s ease;
}
#menuToggle span:first-child {transform-origin: 0% 0%;}
#menuToggle span:nth-last-child(2) {transform-origin: 0% 100%;}
#menuToggle input:checked ~ span {
opacity: 1;
transform: rotate(45deg) translate(-2px, -1px);
background: #232323;
}
#menuToggle input:checked ~ span:nth-last-child(3) {
opacity: 0;
transform: rotate(0deg) scale(0.2, 0.2);
}
#menuToggle input:checked ~ span:nth-last-child(2) {
transform: rotate(-45deg) translate(0, -1px);
}
#mobile-menu {
position: absolute;
width: 300px;
margin: -100px 0 0 -50px;
padding: 50px;
padding-top: 125px;
background: #ededed;
list-style-type: none;
-webkit-font-smoothing: antialiased;
transform-origin: 0% 0%;
transform: translate(-200%, 0);
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}
#mobile-menu li {
padding: 10px 0;
font-size: 22px;
}
#menuToggle input:checked ~ ul {transform: none;}
/* End Mobile Menu */
<!-- Mobile Menu -->
<!-- Made by Erik Terwan -->
<!-- 24th of November 2015 -->
<!-- MIT License -->
<nav role="navigation" id="nav-mobile-menu">
<div id="menuToggle">
<input type="checkbox" />
<span></span> <span></span> <span></span>
<ul id="mobile-menu">
<li>Home</li>
<li>About</li>
<li>History</li>
<li>Campaigns</li>
<li>Contact</li>
</ul>
</div>
</nav>
<!-- End Mobile Menu -->
On the live site, I see the following when clicking on the burger icon:
What is going wrong with the transform: translate(-200%, 0); transform?
Help appreciated.
your toggle-menu is hide, first of all you need to display it and thien try this:
#menuToggle {
display: block;
position: absolute;
top: 50px;
left: 50px;
z-index: 1;
-webkit-user-select: none;
user-select: none;
}
#mobile-menu {
position: absolute;
width: 300px;
margin: -100px 0 0 -100px;
padding: 50px;
padding-top: 50px;
padding-top: 125px;
background: #ededed;
list-style-type: none;
-webkit-font-smoothing: antialiased;
transform-origin: 0% 0%;
transform: translate(-200%, 0);
transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}
I am using a hover effect from hover.css. It works well in every browser except in Opera.
It only seems to work in Opera when I remove the properties:
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
But then, it doesn't work in Firefox.
I have also created this JSFiddle:
https://jsfiddle.net/ta4sju8n/20/
But it seems to work fine there...
HTML:
<ul>
<li>Hover me</li>
<li>Hover me</li>
<li>Hover me</li>
</ul>
SCSS:
body {
background-color: black;
color: white;
}
ul {
list-style: none;
li {
padding: 10px;
a {
display: inline-block;
vertical-align: middle;
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-transform: perspective(1px) translateZ(0);
transform: perspective(1px) translateZ(0);
position: relative;
overflow: hidden;
color: white;
margin-top: 10px;
margin-bottom: 10px;
padding-bottom: 8px;
text-decoration: none;
/* Border bottom animation */
&:after {
content: "";
position: absolute;
z-index: -1;
left: 0;
right: 100%;
bottom: 0;
background: white;
height: 1px;
-webkit-transition-property: right;
transition-property: right;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
&:hover:after {
right: 0;
}
}
}
}
Anybody can help me out here?
Update:
Issue fixed. I removed perspective(1px) and now the property transform looks like so:
-webkit-transform: translateZ(0);
transform: translateZ(0);
Final Code:
HTML:
<ul>
<li>Hover me</li>
<li>Hover me</li>
<li>Hover me</li>
</ul>
SCSS:
body {
background-color: black;
color: white;
}
ul {
list-style: none;
li {
padding: 10px;
a {
display: inline-block;
vertical-align: middle;
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-transform: translateZ(0);
transform: translateZ(0);
position: relative;
overflow: hidden;
color: white;
margin-top: 10px;
margin-bottom: 10px;
padding-bottom: 8px;
text-decoration: none;
/* Border bottom animation */
&:after {
content: "";
position: absolute;
z-index: -1;
left: 0;
right: 100%;
bottom: 0;
background: white;
height: 1px;
-webkit-transition-property: right;
transition-property: right;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
&:hover:after {
right: 0;
}
}
}
}
I'm trying to learn how to animate with CSS in a DevTips Tutorial but had to stop about 8-minutes in since my code isn't animating the menu items properly. They simply pop into place, but are supposed to flip and fade in simultaneously.
I hope it isn't taboo to post something that's been written at CodePen; my sincerest apologies if it is. If it's kosher, CLICK HERE.
As far as I can tell, my code matches exactly what's in the tutorial, so I was hoping someone could spot whatever error I'm overlooking.
Achtung!! My codepen syntax is using Pug and SASS preprocessors, so if you don't like looking at that kind of syntax, the compiled HTML and CSS is included below.
Many thanks in advance.
HTML ::
<nav>
<ul>
<li>style 1
<ul class="drop-menu menu-#{i}">
<li>uno</li>
<li>dos</li>
<li>tres</li>
<li>cuatro</li>
<li>cinco</li>
<li>seis</li>
</ul>
</li>
<li>style 2
<ul class="drop-menu menu-#{i}">
<li>uno</li>
<li>dos</li>
<li>tres</li>
<li>cuatro</li>
<li>cinco</li>
<li>seis</li>
</ul>
</li>
<li>style 3
<ul class="drop-menu menu-#{i}">
<li>uno</li>
<li>dos</li>
<li>tres</li>
<li>cuatro</li>
<li>cinco</li>
<li>seis</li>
</ul>
</li>
<li>style 4
<ul class="drop-menu menu-#{i}">
<li>uno</li>
<li>dos</li>
<li>tres</li>
<li>cuatro</li>
<li>cinco</li>
<li>seis</li>
</ul>
</li>
</ul>
</nav>
CSS ::
nav {
padding: 50px;
text-align: center;
}
nav > ul {
list-style: none;
padding: 0;
margin: 0;
display: inline-block;
background: #ddd;
border-radius: 5px;
}
nav > ul > li {
float: left;
width: 150px;
height: 65px;
line-height: 65px;
position: relative;
text-transform: uppercase;
font-size: 14px;
color: DarkGray;
color: rgba(0, 0, 0, 0.7);
cursor: pointer;
}
nav > ul > li:hover {
background: #d5d5d5;
border-radius: 5px;
}
ul.drop-menu {
position: absolute;
top: 100%;
left: 0;
width: 100%;
padding: 0;
}
ul.drop-menu li {
background: #666;
color: White;
color: rgba(255, 255, 255, 0.7);
}
ul.drop-menu li:hover {
background: #606060;
}
ul.drop-menu li:last-child {
border-radius: 0 0 5px 5px;
}
ul.drop-menu li {
display: none;
}
li:hover > ul.drop-menu li {
display: block;
}
li:hover > ul.drop-menu.menu-1 {
-webkit-perspective: 1000px;
perspective: 1000px;
}
li:hover > ul.drop-menu.menu-1 li {
opacity: 0;
-webkit-animation-name: menu1;
animation-name: menu1;
-webkit-animation-duration: 500ms;
animation-duration: 500ms;
-webkit-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
#-webkit-keyframes menu1 {
0% {
opacity: 0;
-webkit-transform: rotateY(-90deg) translateY(30px);
transform: rotateY(-90deg) translateY(30px);
}
100% {
opacity: 1;
-webkit-transform: rotateY(0deg) translateY(0px);
transform: rotateY(0deg) translateY(0px);
}
}
#keyframes menu1 {
0% {
opacity: 0;
-webkit-transform: rotateY(-90deg) translateY(30px);
transform: rotateY(-90deg) translateY(30px);
}
100% {
opacity: 1;
-webkit-transform: rotateY(0deg) translateY(0px);
transform: rotateY(0deg) translateY(0px);
}
}
Looks like you have a very simple problem with your Pug processing in this line:
ul(class="drop-menu menu-#{i}")
This isn't adding the class "menu-1" through "menu-4" as expected. To fix this write the Pug statement like this instead:
ul(class="drop-menu menu-" + i)
This is the new syntax that Pug specifies using, you can read more here.
I have found a sidebar and have insert a link. Here you can see a sample.
But the link doesn't work because the sidebar overlays the link. What can I do to resolve this problem?
z-index is not working for me.
a {
color: #fff;
text-decoration: none;
}
.me {
width: 400px;
margin: 90px auto;
}
.me p,
.me h1 {
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;
}
.me p {
font-weight: 200;
}
.me span {
font-weight: bold;
}
.social {
position: fixed;
top: 20px;
}
.social ul {
padding: 0px;
-webkit-transform: translate(-270px, 0);
-moz-transform: translate(-270px, 0);
-ms-transform: translate(-270px, 0);
-o-transform: translate(-270px, 0);
transform: translate(-270px, 0);
}
.social ul li {
display: block;
margin: 5px;
background: rgba(0, 0, 0, 0.36);
width: 300px;
text-align: right;
padding: 10px;
-webkit-border-radius: 0 30px 30px 0;
-moz-border-radius: 0 30px 30px 0;
border-radius: 0 30px 30px 0;
-webkit-transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
}
.social ul li:hover {
-webkit-transform: translate(110px, 0);
-moz-transform: translate(110px, 0);
-ms-transform: translate(110px, 0);
-o-transform: translate(110px, 0);
transform: translate(110px, 0);
background: rgba(255, 255, 255, 0.4);
}
.social ul li:hover a {
color: #000;
}
.social ul li:hover i {
color: #fff;
background: rgba(0, 0, 0, 0.36);
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
}
.social ul li i {
margin-left: 10px;
color: #000;
background: #fff;
padding: 10px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 20px;
height: 20px;
font-size: 20px;
background: #ffffff;
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
body {
background: #25343F;
color: #fff;
font-family: 'Raleway', sans-serif;
}
<link href='http://fonts.googleapis.com/css?family=Raleway:400,200' rel='stylesheet' type='text/css'>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<div>
<br />
<br />
<br />a link who don't work becauce overlay
</div>
<nav class="social">
<ul>
<li>Twitter <i class="fa fa-twitter"></i>
</li>
<li>Facebook <i class="fa fa-facebook"></i>
</li>
<li>Dribbble <i class="fa fa-dribbble"></i>
</li>
<li>Behance <i class="fa fa-behance"></i>
</li>
</ul>
</nav>
<div class="me">
<p>Created by:
<p>
<h1>Gian Di Serafino</h1>
<p>for <span>Informartion architecture</span>
</p>
</div>
You need to give the div a position. In order not to mess with z-indexes, put the div after the sidebar.
div.problematic_div {
position:relative;
}
But I recommend you to check how you are positioning your elements.
div.problematic_div {
position: relative;
}
a {
color: #fff;
text-decoration: none;
}
.me {
width: 400px;
margin: 90px auto;
}
.me p,
.me h1 {
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;
}
.me p {
font-weight: 200;
}
.me span {
font-weight: bold;
}
.social {
position: fixed;
top: 20px;
}
.social ul {
padding: 0px;
-webkit-transform: translate(-270px, 0);
-moz-transform: translate(-270px, 0);
-ms-transform: translate(-270px, 0);
-o-transform: translate(-270px, 0);
transform: translate(-270px, 0);
}
.social ul li {
display: block;
margin: 5px;
background: rgba(0, 0, 0, 0.36);
width: 300px;
text-align: right;
padding: 10px;
-webkit-border-radius: 0 30px 30px 0;
-moz-border-radius: 0 30px 30px 0;
border-radius: 0 30px 30px 0;
-webkit-transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
}
.social ul li:hover {
-webkit-transform: translate(110px, 0);
-moz-transform: translate(110px, 0);
-ms-transform: translate(110px, 0);
-o-transform: translate(110px, 0);
transform: translate(110px, 0);
background: rgba(255, 255, 255, 0.4);
}
.social ul li:hover a {
color: #000;
}
.social ul li:hover i {
color: #fff;
background: rgba(0, 0, 0, 0.36);
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-ms-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
}
.social ul li i {
margin-left: 10px;
color: #000;
background: #fff;
padding: 10px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
border-radius: 50%;
width: 20px;
height: 20px;
font-size: 20px;
background: #ffffff;
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
body {
background: #25343F;
color: #fff;
font-family: 'Raleway', sans-serif;
}
<link href='http://fonts.googleapis.com/css?family=Raleway:400,200' rel='stylesheet' type='text/css'>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<nav class="social">
<ul>
<li>Twitter <i class="fa fa-twitter"></i>
</li>
<li>Facebook <i class="fa fa-facebook"></i>
</li>
<li>Dribbble <i class="fa fa-dribbble"></i>
</li>
<li>Behance <i class="fa fa-behance"></i>
</li>
</ul>
</nav>
<div class="problematic_div">
<br />
<br />
<br />a link who don't work becauce overlay
</div>
<div class="me">
<p>Created by:
<p>
<h1>Gian Di Serafino</h1>
<p>for <span>Informartion architecture</span>
</p>
</div>
I think it may have something to do with a pseudo element, but I'm not sure. I am having difficulties with the effect of a transform transition using css3. In Firefox v24, the effect works as I want it to - see the CodePen here http://codepen.io/patrickwc/pen/aKEec but in Chrome and IE, the border effect of the links animate and then suddenly switch back into position. It is difficult to describe so the best way is to look at the effect in Firefox then in Chrome or IE.
body {
background: #000;
color: #fff;
}
p {
text-align: center;
}
nav.footer-social-links a {
position: relative;
margin: 0 10px;
text-transform: uppercase;
letter-spacing: 1px;
padding: 1px 12px 0 8px;
height: 32px;
line-height: 30px;
outline: none;
font-size: 0.8em;
text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
}
nav.footer-social-links a:hover,
nav.footer-social-links a:focus {
outline: none;
}
.footer-social-links a::before,
.footer-social-links a::after {
position: absolute;
width: 30px;
height: 2px;
background: #fff;
content: '';
opacity: 0.2;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
-webkit-transition: all 0.3s;
transition: all 0.3s;
pointer-events: none;
}
.footer-social-links a::before {
top: 0;
left: 0;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
transform-origin: 0 0;
}
.footer-social-links a::after {
right: 0;
bottom: 0;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
-webkit-transform-origin: 100% 0;
-moz-transform-origin: 100% 0;
transform-origin: 100% 0;
}
.footer-social-links a:hover::before,
.footer-social-links a:hover::after,
.footer-social-links a:focus::before,
.footer-social-links a:focus::after {
opacity: 1;
}
.footer-social-links {
margin: 0;
text-align: center;
}
.footer-social-links a {
color: white;
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
display: inline-block;
text-decoration: none;
}
.footer-social-links a:hover::before,
.footer-social-links a:focus::before {
width: 80%;
left: 10%;
-webkit-transform: rotate(0deg) translateX(50%);
-moz-transform: rotate(0deg) translateX(50%);
transform: rotate(0deg) translateX(50%);
}
.footer-social-links a:hover::after,
.footer-social-links a:focus::after {
width: 80%;
right: 5%;
-webkit-transform: rotate(0deg) translateX(50%);
-moz-transform: rotate(0deg) translateX(50%);
transform: rotate(0deg) translateX(50%);
}
<br/>
<nav class="footer-social-links">
<a href="google" target="_blank">
<i class="shc icon-e-gplus"></i>Gplus </a>
<a href="facebook" target="_blank">
<i class="shc icon-e-facebook"></i>Facebook </a>
<a href="twitter" target="_blank">
<i class="shc icon-e-twitter"></i>Twitter </a>
<a href="linkedin" target="_blank">
<i class="shc icon-e-linkedin"></i>Linkedin </a>
<a href="skype" target="_blank">
<i class="shc icon-e-skype"></i>Skype </a>
<a href="http://last.fm/user/zerodegreeburn" target="_blank">
<i class="shc icon-e-lastfm"></i>Lastfm </a>
</nav>
<p>Fixed with help from css-tricks forum and stackoverflow here
</p>
I have a feeling messing with transform-origin might fix it, but I've been unable to get that to work. Any help or explanation as to the difference would be greatly appreciated.
I am not sure about why Chrome has problems with your code, but you can simplify it and then it will work ok in all the browsers.
You should change your CSS to
.footer-social-links a:hover::before,
.footer-social-links a:focus::before {
width: 80%;
left: 10%;
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
.footer-social-links a:hover::after,
.footer-social-links a:focus::after {
width: 80%;
right: 10%;
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
}
It is useless to do a translate in X and at the same time modify your left value; better concentrate the changes in a single value (left) and eliminate the translateX