Last active
March 13, 2020 19:45
-
-
Save JiDai/5710cac84e833f091ee639ecba346720 to your computer and use it in GitHub Desktop.
background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.menu { | |
display: flex; | |
align-items: center; | |
} | |
.menu__item:before { | |
content: ''; | |
background: linear-gradient(-90deg, #168dcf00, #168dcfff); | |
top: 0; | |
left: -100%; | |
width: 100%; | |
height: 100%; | |
position: absolute; | |
} | |
.menu__item { | |
overflow: hidden; | |
position: relative; | |
padding: 1rem 3rem 1rem 1rem; | |
border: #0962be solid; | |
border-width: 2px 0; | |
margin: 1rem; | |
color: white; | |
background: linear-gradient(-90deg, #01002400, #010024ff); | |
} | |
.menu__item:hover:before { | |
border-color: #00d8e9; | |
color: white; | |
transition: left 0 500ms linear; | |
} | |
.menu__item:hover { | |
color: #00d8e9; | |
animation: gradient 1s ease; | |
} | |
body { | |
/* background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); | |
background-size: 400% 400%; | |
animation: gradient 15s ease infinite; */ | |
background: #012148; | |
color: white; | |
} | |
@keyframes gradient { | |
0%{background-position:0% 50%} | |
50%{background-position:100% 50%} | |
100%{background-position:0% 50%} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Menu</h1> | |
<nav class="menu"> | |
<a href="#" class="menu__item">Menu 1</a> | |
<a href="#" class="menu__item">Menu 2</a> | |
<a href="#" class="menu__item">Menu 3</a> | |
<a href="#" class="menu__item">Menu 4</a> | |
<a href="#" class="menu__item">Menu 5</a> | |
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment