I am trying to create a search icon that transforms into an input when hovered over. I am using the pseudo class ::after for the handle of the magnifying glass. Essentially, I want the handle to smoothly disappear when the icon is hovered over. Here is a link to my codepen.
body {
text-align: center;
}
#magnifying-glass {
display: flex;
justify-content: center;
height: 100px;
width: 100px;
border-radius: 100px;
border: 14px solid red;
margin: 0 auto;
margin-top: 200px;
transition: 1s;
}
#magnifying-glass::after {
content: "";
height: 50px;
width: 14px;
background-color: red;
transform: rotate(-45deg);
position: relative;
top: 85px;
left: 50px;
-webkit-transition: 1s;
-moz-transition: 1s;
-o-transition: 1s;
transition: 1s;
}
input {
display: none;
border: none;
width: 70%;
font-size: 2.5em;
border-radius: 40px;
}
input:focus {
outline: none;
}
#magnifying-glass:hover {
width: 300px;
}
#magnifying-glass:hover #magnifying-glass::after {
width: 0px;
}
#magnifying-glass:hover input {
display: block;
}
<div id="magnifying-glass">
<input type="text" placeholder="Search">
</div>
Thanks so much!
If you want it to smoothly disappear and not so sharp change the transition times below to the following.
#magnifying-glass::after {
content: "";
height: 50px;
width: 14px;
border-radius: 10px;
background-color: red;
transform: rotate(-45deg);
position: absolute;
top: 88px;
left: 100px;
-webkit-transition: 2.5s;
-moz-transition: 2.5s;
-o-transition: 2.5s;
transition: 2.5s;
}
And to make it even smoother you can add:
#magnifying-glass:hover::after {
transform: rotate(360deg);
height: 0;
opacity: 0;
}
Heres a codepen with these changes. https://codepen.io/Ballard/pen/EgYLKG
Add an opacity: 0 to hover state
#magnifying-glass:hover::after {
transform: rotate(360deg);
height: 0;
opacity: 0;
}
DEMO: https://jsfiddle.net/2691pjod/3/
Snippet
body {
text-align: center;
background: #fff;
}
#magnifying-glass {
display: flex;
justify-content: center;
height: 100px;
width: 100px;
border-radius: 100px;
border: 14px solid red;
margin: 0 auto;
margin-top: 200px;
transition: 1s;
}
#magnifying-glass::after {
content: "";
height: 50px;
width: 14px;
border-radius: 10px;
background-color: red;
transform: rotate(-45deg);
position: relative;
top: 85px;
left: 50px;
-webkit-transition: 1s;
-moz-transition: 1s;
-o-transition: 1s;
transition: 1s;
}
input {
display: none;
border: none;
width: 70%;
font-size: 2.5em;
border-radius: 40px;
}
input:focus {
outline: none;
}
#magnifying-glass:hover {
width: 300px;
}
#magnifying-glass:hover::after {
transform: rotate(360deg);
height: 0;
opacity: 0;
}
#magnifying-glass:hover input {
display: block;
}
<div id="magnifying-glass">
<input type="text" placeholder="Search">
</div>
Related
I'm looking to place the toggle button aligned to the center of my element "Client_name" I created another div but I can't get the button to drop down and put it more to the right. Do you have any ideas?
The jsfiddle link is just below
https://jsfiddle.net/6cyuwxvf/
.switch {
position: relative;
display: inline-block;
width: 73px;
height: 32px;
}
.switch input {display:none;}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #CD3B1B;
-webkit-transition: .4s;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #89C445;
}
input:focus + .slider {
box-shadow: 0 0 1px #89C445;
}
input:checked + .slider:before {
-webkit-transform: translateX(86px);
-ms-transform: translateX(36px);
transform: translateX(38px);
}
.button10 {
background-color: white;
color: black;
border: 2px solid;
width: 500px;
height: 50px;
}
.div-permission {
display: table-cell;
vertical-align: middle;
height: 45px;
width: 900px;
border: 1px solid red;
}
You can use display: flex; with align-items: center; for vertical alignment and just add some margin to the switch.
.switch {
position: relative;
display: inline-block;
width: 73px;
height: 32px;
margin-left: 0.25rem;
}
.switch input {
display: none;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #CD3B1B;
-webkit-transition: .4s;
transition: .4s;
border-radius: 34px;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
border-radius: 50%;
}
input:checked+.slider {
background-color: #89C445;
}
input:focus+.slider {
box-shadow: 0 0 1px #89C445;
}
input:checked+.slider:before {
-webkit-transform: translateX(86px);
-ms-transform: translateX(36px);
transform: translateX(38px);
}
.button10 {
background-color: white;
color: black;
border: 2px solid;
width: 500px;
height: 50px;
}
.div-permission {
display: flex;
align-items: center;
height: 45px;
width: 900px;
border: 1px solid red;
}
<div class="div-permission">
<input type="text" class="button10" placeholder="Client_name" />
<label class="switch">
<input type="checkbox" id="togBtn" onclick="myFunction()" />
<div class="slider round"></div>
</label>
<input type="submit" id="myDIV" style="display: none;" name="valider" onclick="style.display = 'none'" />
</div>
In order to change the position, I use the CSS transform function.
Change your .switch class to this:
.switch {
position: relative;
display: inline-block;
width: 73px;
height: 32px;
top:50%;
left:10%;
transform: translate(-50%,-50%);
}
That should center it for you! All I added was the top, left, and transform functions in the class.
I'm trying to get the border on my button to appear, it works perfectly with solid background colors but not with a image . You can see the border when clicking on the button but not when mouse over it.
I just want the border to be visible.
<html lang="en"> <head>
<style>
#import url(https://fonts.googleapis.com/css?family=Montserrat);
*, *::after, *::before {
box-sizing: border-box;
}
body {
{ background-image: url("https://cdn.pixabay.com/photo/2016/09/05/15/07/concrete-1646788_960_720.jpg") }
}
.container {
display: flex;
flex-direction: column;
justify-content: center;
height: 100vh;
width: 100vw;
text-align: center;
}
button {
font-family: "Montserrat", sans-serif;
text-transform: uppercase;
}
button {
position: relative;
border: none;
font-size: 18px;
transition: color 0.5s, transform 0.2s, background-color 0.2s;
outline: none;
border-radius: 3px;
margin: 0 10px;
padding: 23px 33px;
border: 3px solid transparent;
}
button:active {
transform: translateY(3px);
}
button::after, button::before {
border-radius: 3px;
}
.shrink-border {
background-color: transparent;
color: #1b1b20;
}
.shrink-border:hover {
background-color: transparent;
box-shadow: none;
color: #E3BD1C;
}
.shrink-border::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 3px solid #1b1b20;
transition: opacity 0.3s, border 0.3s;
}
.shrink-border:hover::before {
opacity: 0;
}
.shrink-border::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
border: 3px solid #E3BD1C;
opacity: 0;
z-index: -1;
transform: scaleX(1.1) scaleY(1.3);
transition: transform 0.3s, opacity 0.3s;
}
.shrink-border:hover::after {
opacity: 1;
transform: scaleX(1) scaleY(1);
}
.material-bubble {
background-color: transparent;
color: #EEC02C;
border: 3px solid #EEC02C;
overflow: hidden;
box-shadow: none;
}
.material-bubble:hover {
color: #EEC02C;
}
.material-bubble::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 3px solid #EEC02C;
transition: opacity 0.3s, border 0.3s;
}
.material-bubble:hover::before {
opacity: 0;
}
.material-bubble::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
background-color: #EEC02C;
border-color: #EEC02C;
border-radius: 50%;
transform: translate(-10px, -70px) scale(0.1);
opacity: 0;
z-index: -1;
transition: transform 0.3s, opacity 0.3s, background-color 0.3s;
}
.material-bubble:hover::after {
opacity: 1;
transform-origin: 100px 100px;
transform: scale(1) translate(-10px, -70px);
}
</style>
</head>
<body translate="no">
<div class="container">
<div>
<div style="background-image: url('https://cdn.pixabay.com/photo/2016/09/05/15/07/concrete-1646788_960_720.jpg');">
<a href="https://sites.google.com/u/0/d/1qexyDxBEpBgUx3IVqODoqfLs59AG0eV1/p/1SsjI8NaKooq171w4dA5LW0NvxKX9ACkG/preview?authuser=0">
<button class="shrink-border">Make an Appointment</button>
</a>
</a>
</div>
</div>
</body></html>
Just add a z-index to your border:
.shrink-border {
background-color: transparent;
color: #1b1b20;
z-index: 0; /* <--- Add this */
}
Full working Demo:
<html lang="en"> <head>
<style>
#import url(https://fonts.googleapis.com/css?family=Montserrat);
*, *::after, *::before {
box-sizing: border-box;
}
body {
{ background-image: url("https://cdn.pixabay.com/photo/2016/09/05/15/07/concrete-1646788_960_720.jpg") }
}
.container {
display: flex;
flex-direction: column;
justify-content: center;
height: 100vh;
width: 100vw;
text-align: center;
}
button {
font-family: "Montserrat", sans-serif;
text-transform: uppercase;
}
button {
position: relative;
border: none;
font-size: 18px;
transition: color 0.5s, transform 0.2s, background-color 0.2s;
outline: none;
border-radius: 3px;
margin: 0 10px;
padding: 23px 33px;
border: 3px solid transparent;
}
button:active {
transform: translateY(3px);
}
button::after, button::before {
border-radius: 3px;
}
.shrink-border {
background-color: transparent;
color: #1b1b20;
z-index: 0; /* <--- Add this */
}
.shrink-border:hover {
background-color: transparent;
box-shadow: none;
color: #E3BD1C;
}
.shrink-border::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 3px solid #1b1b20;
transition: opacity 0.3s, border 0.3s;
}
.shrink-border:hover::before {
opacity: 0;
}
.shrink-border::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
border: 3px solid #E3BD1C;
opacity: 0;
z-index: -1;
transform: scaleX(1.1) scaleY(1.3);
transition: transform 0.3s, opacity 0.3s;
}
.shrink-border:hover::after {
opacity: 1;
transform: scaleX(1) scaleY(1);
}
.material-bubble {
background-color: transparent;
color: #EEC02C;
border: 3px solid #EEC02C;
overflow: hidden;
box-shadow: none;
}
.material-bubble:hover {
color: #EEC02C;
z-index: -1;
}
.material-bubble::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 3px solid #EEC02C;
transition: opacity 0.3s, border 0.3s;
}
.material-bubble:hover::before {
opacity: 0;
}
.material-bubble::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
background-color: #EEC02C;
border-color: #EEC02C;
border-radius: 50%;
transform: translate(-10px, -70px) scale(0.1);
opacity: 0;
z-index: -1;
transition: transform 0.3s, opacity 0.3s, background-color 0.3s;
}
.material-bubble:hover::after {
opacity: 1;
transform-origin: 100px 100px;
transform: scale(1) translate(-10px, -70px);
}
</style>
</head>
<body translate="no">
<div class="container">
<div>
<div style="background-image: url('https://cdn.pixabay.com/photo/2016/09/05/15/07/concrete-1646788_960_720.jpg');">
<a href="https://sites.google.com/u/0/d/1qexyDxBEpBgUx3IVqODoqfLs59AG0eV1/p/1SsjI8NaKooq171w4dA5LW0NvxKX9ACkG/preview?authuser=0">
<button class="shrink-border">Make an Appointment</button>
</a>
</a>
</div>
</div>
</body></html>
Add this to your css
.shrink-border:hover {
transform: translateY(3px);
}
I have a problem. I want to use a animated checkbox and tried adding it to my code. The first problem I have is that the checkbox was floating a row above the <p> tag. For that I tried to create a flexbox with align-items: center;, but that results in a row that is aligned for some reason to the right side and the checkbox is still not at the same height as the <p> tag.
Here is the code snippet:
._checkbox
{
display: none;
}
label
{
width: 20px;
height: 20px;
margin: 0 auto;
background-color: #3f97fc;
transform: translateY(-50%);
border-radius: 50%;
cursor: pointer;
transition: 0.2s ease transform, 0.2s ease background-color, 0.2s;
overflow: hidden;
z-index: 1;
}
label:before
{
content: "";
position: absolute;
top: 50%;
right: .5%;
left: 0;
width: 15px;
height: 15px;
margin: 0 auto;
background-color: #fff;
transform: translateY(-50%);
border-radius: 50%;
transition: 0.2s ease width, 0.2s ease height;
}
#tick_mark
{
position: absolute;
top: 3px;
right: 0;
left: -11px;
width: 12px;
height: 10px;
margin: 0 auto;
margin-left: 14px;
transform: rotateZ(-40deg);
}
#tick_mark:before, #tick_mark:after
{
content: "";
position: absolute;
background-color: #fff;
border-radius: 2px;
opacity: 0;
transition: 0.2s ease transform, 0.2s ease opacity;
}
#tick_mark:before
{
left: 0;
bottom: 0;
width: 3px;
height: 8px;
transform: translateY(-68px)
}
#tick_mark:after
{
left: 0;
bottom: 0;
width: 100%;
height: 3px;
transform: translateX(78px)
}
._checkbox:checked + label
{
background-color: #07d410;
}
._checkbox:checked + label:before
{
width: 0;
height: 0;
}
._checkbox:checked + label #tick_mark:before, ._checkbox:checked + label #tick_mark:after
{
transform: translate(0);
opacity: 1;
}
.checkbox_container
{
display: flex;
align-items: center;
space-between: 0px
}
.teskt {
padding: 0px;
}
<div class="option 0, checkbox_container"><input type="checkbox" id="Air Quality" class="_checkbox"><label for="Air Quality"><div id="tick_mark"></div></label><p class="tekst"> Air Quality - 7 Project(s)</p></div>
So just to be clear... I want the checkbox next to the <p> tag and the height of them needs to be on the same level. Also, the content needs to be aligned to the right side!
Can someone tell me how to achieve this?
Everything aligned to left, vertically on the same level, like this?
I removed transform from label, not sure why you had it there and set it to position relative and replaced margin with margin right for spacing. On the flex container I updated it to
.checkbox_container {
display: flex;
align-items: center; // vertically centers flex items
}
._checkbox {
display: none;
}
label {
width: 20px;
height: 20px;
background-color: #3f97fc;
position: relative;
border-radius: 50%;
cursor: pointer;
transition: 0.2s ease transform, 0.2s ease background-color, 0.2s;
overflow: hidden;
z-index: 1;
margin-right: 10px;
}
label:before {
content: "";
position: absolute;
top: 50%;
right: .5%;
left: 0;
width: 15px;
height: 15px;
margin: 0 auto;
background-color: #fff;
transform: translateY(-50%);
border-radius: 50%;
transition: 0.2s ease width, 0.2s ease height;
}
#tick_mark {
position: absolute;
top: 3px;
right: 0;
left: -11px;
width: 12px;
height: 10px;
margin: 0 auto;
margin-left: 14px;
transform: rotateZ(-40deg);
}
#tick_mark:before,
#tick_mark:after {
content: "";
position: absolute;
background-color: #fff;
border-radius: 2px;
opacity: 0;
transition: 0.2s ease transform, 0.2s ease opacity;
}
#tick_mark:before {
left: 0;
bottom: 0;
width: 3px;
height: 8px;
transform: translateY(-68px)
}
#tick_mark:after {
left: 0;
bottom: 0;
width: 100%;
height: 3px;
transform: translateX(78px)
}
._checkbox:checked+label {
background-color: #07d410;
}
._checkbox:checked+label:before {
width: 0;
height: 0;
}
._checkbox:checked+label #tick_mark:before,
._checkbox:checked+label #tick_mark:after {
transform: translate(0);
opacity: 1;
}
.checkbox_container {
display: flex;
align-items: center;
}
.teskt {
padding: 0px;
}
<div class="option 0, checkbox_container">
<input type="checkbox" id="Air Quality" class="_checkbox">
<label for="Air Quality">
<span id="tick_mark"></span>
</label>
<p class="tekst"> Air Quality - 7 Project(s)</p>
</div>
Below is my HTML/CSS code in which I am trying to create a similar effect like HOME button as mentioned here - https://codepen.io/larrygeams/pen/pdchG
I made it to a single class, but my code is not working. Let me know what I am doing wrong here.
.btn-primary {
background: green;
border: none;
border-radius: 10px;
padding: 10px 20px;
color: #FFF;
}
.btn-primary:hover {
color: #FFF;
cursor: pointer;
}
.btn-primary:after {
content: "";
height: 100%;
left: 0;
top: 0;
width: 0px;
position: absolute;
transition: all 0.3s ease 0s;
-webkit-transition: all 0.3s ease 0s;
z-index: -1;
}
.btn-primary:after:hover {
background: red;
width: 100%;
height: 100%;
}
<button class="btn-primary" type="submit">
<div class="inner">Add to bag</div>
</button>
My Non Working Codepen Link - https://codepen.io/anon/pen/gBdVoj?editors=1100
hover pseudo needs to be placed before ::after
:hover::after
.btn-primary {
width: auto;
position: relative;
background: green;
border: none;
border-radius: 10px;
padding: 10px 20px;
color: #FFF;
z-index: 2;
}
.btn-primary:hover {
cursor:pointer;
}
.btn-primary::after {
content: "";
position: absolute;
height: 100%;
left: 0;
top: 0;
width: 0;
border-radius: 10px;
transition: all 0.3s ease 0s;
z-index: -1;
}
.btn-primary:hover::after {
width: 100%;
background: red;
}
<button class="btn-primary" type="submit">Add to bag</button>
I need to center horizontally a button with aboslute position (because it must keep on top when to click and launch overlay and click to close overlay) on a position fixed topbar, here is the code:
.topbar {
text-align: center;
min-width: 100%;
height: 50px;
background-color: #29343a;
position: fixed;
top: 0;
}
.button {
display: inline-block;
margin-right: auto;
margin-left: auto;
width: 60px;
height: 50px;
cursor: pointer;
background-color: #00c1e2;
border-bottom: 2px solid #00a8c6;
z-index: 100;
position: absolute;
}
.overlay {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: rgba(153,204,51,0.9);
}
Thats is just the css of the three parts, the website is more complex but i think that 3 parts are the key. the topbar must be fixed on top, the buton have to be centered into the topbar div, and the overlay launch and the buttop keeps on top of the overlay.
What is working: the overlay works fine and the button keeps on top but its not horizontally centered on the topbar.
How i can hack this?
You could to the left:0 and right:0 trick.
.button {
display: inline-block;
margin-right: auto;
margin-left: auto;
width: 60px;
height: 50px;
cursor: pointer;
background-color: #00c1e2;
border-bottom: 2px solid #00a8c6;
z-index: 100;
position: absolute;
left: 0; /*added*/
right: 0; /*added*/
}
Or do the left:50% with negative left margin (half width).
.button {
display: inline-block;
width: 60px;
height: 50px;
cursor: pointer;
background-color: #00c1e2;
border-bottom: 2px solid #00a8c6;
z-index: 100;
position: absolute;
left: 50%; /*added*/
margin-left: -30px; /*added*/
}
Or use CSS3 transform.
.button {
display: inline-block;
width: 60px;
height: 50px;
cursor: pointer;
background-color: #00c1e2;
border-bottom: 2px solid #00a8c6;
z-index: 100;
position: absolute;
left: 50%; /*added*/
transform: translateX(-50%); /*added*/
}
Based on the information you provided this is what I could come up with:
/* CSS */
.topBar {
position:fixed;
top:0;
left:0;
width:100%;
height:auto;
background-color:#29343a;
}
.overlay {
display:none;
width: 100%;
background: rgba(153,204,51,0.9);
margin:0;
}
.button, .button:active, .button:visited, .button:hover {
display: block;
position:relative;
text-align:center;
cursor: pointer;
background-color: #00c1e2;
border-bottom: 2px solid #00a8c6;
margin:0 auto;
padding:10px;
}
.topBar:hover > .overlay {
display:block;
}
And I added some html because you didn't provide any:
<!-- HTML -->
<div class="topBar">
Button
<div class="overlay">
<p>Some text shows when button hover</p>
</div>
</div>
JSFIDDLE: https://jsfiddle.net/0napm6y3/
Here is the complete code of this component made on react:
This is the react component, the overlay launch is the overlay var, the other one is for one animation on the button:
var React = require('react');
var StatusBarButtonView = React.createClass({
getInitialState: function() {
return {cliked: false};
},
handleClick: function(event) {
this.setState({cliked: !this.state.cliked});
},
render: function() {
var fondo = this.state.cliked ? 'active' : '';
var overlay = this.state.cliked ? 'open' : '';
return (
<div>
<div className={"aui-profit-statusbar-button-container " + (fondo)} onClick={this.handleClick}>
<img src="images/aui-navbar-element-icon-cross.png" className={"rotate " + (fondo)}/>
</div>
<div className={"overlay overlay-slidedown " + (overlay)}>
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Work</li>
<li>Clients</li>
<li>Contact</li>
</ul>
</nav>
</div>
</div>
);
}
});
module.exports = StatusBarButtonView;
Here is the topbar scss:
.aui-profit-statusbar-container {
text-align: center;
min-width: 100%;
height: 50px;
background-color: #29343a;
position: fixed;
top: 0;
}
Here is the button scss:
.aui-profit-statusbar-button-container {
display: inline-block;
margin-right: auto;
margin-left: auto;
width: 60px;
height: 50px;
cursor: pointer;
background-color: #00c1e2;
border-bottom: 2px solid #00a8c6;
z-index: 100;
position: absolute;
left: 0;
right: 0;
&:hover {
background-color: #56d9f6;
}
&.active {
background-color: #ff4b39;
border-bottom: 2px solid #e43f30;
}
.rotate {
margin-top: 13px;
width: 23px;
height: 23px;
-webkit-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
-ms-transition-duration: 0,2s;
-o-transition-duration: 0.2s;
transition-duration: 0.2s;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-ms-transition-property: -ms-transform;
-o-transition-property: -o-transform;
transition-property: transform;
}
.active {
-webkit-transform: rotate(135deg);
-moz-transform: rotate(135deg);
-ms-transform: rotate(135deg);
-o-transform: rotate(135deg);
transform: rotate(135deg);
}
}
Here is the overlay css:
/* Overlay style */
.overlay {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: rgba(153,204,51,0.9);
}
/* Overlay closing cross */
.overlay .overlay-close {
width: 80px;
height: 80px;
position: absolute;
right: 20px;
top: 20px;
overflow: hidden;
border: none;
background: url(../img/cross.png) no-repeat center center;
text-indent: 200%;
color: transparent;
outline: none;
z-index: 100;
}
/* Menu style */
.overlay nav {
text-align: center;
position: relative;
top: 50%;
height: 60%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.overlay ul {
list-style: none;
padding: 0;
margin: 0 auto;
display: inline-block;
height: 100%;
position: relative;
}
.overlay ul li {
display: block;
height: 20%;
height: calc(100% / 5);
min-height: 54px;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.overlay ul li a {
font-size: 54px;
font-weight: 300;
display: block;
color: #fff;
-webkit-transition: color 0.2s;
transition: color 0.2s;
}
.overlay ul li a:hover,
.overlay ul li a:focus {
color: #e3fcb1;
}
/* Effects */
.overlay-slidedown {
visibility: hidden;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: -webkit-transform 0.4s ease-in-out, visibility 0s 0.4s;
transition: transform 0.4s ease-in-out, visibility 0s 0.4s;
}
.overlay-slidedown.open {
visibility: visible;
-webkit-transform: translateY(0%);
transform: translateY(0%);
-webkit-transition: -webkit-transform 0.4s ease-in-out;
transition: transform 0.4s ease-in-out;
}
#media screen and (max-height: 30.5em) {
.overlay nav {
height: 70%;
font-size: 34px;
}
.overlay ul li {
min-height: 34px;
}
}
Now it works perfectly, thanks to all.
Next thing i have to do is separate overlay of buttom component. and keep it running, but im wondering to to pass the action to one component to another.... i have to learn more about react.js