Log in
Start Coding
All
Accordion
border
Buttons
Cards
Carousel
Css Animation
Hexagons
Hover
Layout
Loaders
Menu
Navigation
Slider
Tables
Wave
All
Item 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Item 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Item 3
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
html, body {color: #fff; background-color: #131417; padding: 15px;} $fluent-timing: cubic-bezier(.16,1,.29,.99); @mixin bezier-trans($style: all) { $style: unquote($style); transition-property: $style; transition-duration: .4s; transition-timing-function: $fluent-timing; } @keyframes fontSizeIn { 0% { font-size: 0; opacity: 0; } 100% { font-size: initial; opacity: 0; } } @keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } details { width: 750px; margin: auto; + details { margin-top: 15px; } ::-webkit-details-marker { display: none; // Hide marker for Blink and Webkit } summary { list-style-type: none; // Hide marker for Gecko cursor: pointer; padding: 5px; &::after { content: "\f107"; font-family: "Font Awesome 5 Pro"; display: block; float: right; @include bezier-trans(); } + div { margin-top: 10px; padding: 5px; } } &[open] { summary::after { transform: rotate(180deg); } div { animation-name: fontSizeIn, fadeIn; animation-duration: 160ms, 160ms; animation-delay: 0ms, 160ms; } } }
24
Pure CSS Animated Accordion
By:
pixeldev
Responsive Card Grid Layout
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Made with ♡
/* Font */ @import url('https://fonts.googleapis.com/css?family=Quicksand:400,700'); /* Design */ *, *::before, *::after { box-sizing: border-box; } html { background-color: #ecf9ff; } body { color: #272727; font-family: 'Quicksand', serif; font-style: normal; font-weight: 400; letter-spacing: 0; padding: 1rem; } .main{ max-width: 1200px; margin: 0 auto; } h1 { font-size: 24px; font-weight: 400; text-align: center; } img { height: auto; max-width: 100%; vertical-align: middle; } .btn { color: #ffffff; padding: 0.8rem; font-size: 14px; text-transform: uppercase; border-radius: 4px; font-weight: 400; display: block; width: 100%; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.2); background: transparent; } .btn:hover { background-color: rgba(255, 255, 255, 0.12); } .cards { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; } .cards_item { display: flex; padding: 1rem; } @media (min-width: 40rem) { .cards_item { width: 50%; } } @media (min-width: 56rem) { .cards_item { width: 33.3333%; } } .card { background-color: white; border-radius: 0.25rem; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; overflow: hidden; } .card_content { padding: 1rem; background: linear-gradient(to bottom left, #EF8D9C 40%, #FFC39E 100%); } .card_title { color: #ffffff; font-size: 1.1rem; font-weight: 700; letter-spacing: 1px; text-transform: capitalize; margin: 0px; } .card_text { color: #ffffff; font-size: 0.875rem; line-height: 1.5; margin-bottom: 1.25rem; font-weight: 400; } .made_by{ font-weight: 400; font-size: 13px; margin-top: 35px; text-align: center; }
24
Responsive Card Grid Layout
By:
pixeldev
Responsive Card Grid Layout
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Card Grid Layout
Demo of pixel perfect pure CSS simple responsive card grid layout
Read More
Made with ♡
/* Font */ @import url('https://fonts.googleapis.com/css?family=Quicksand:400,700'); /* Design */ *, *::before, *::after { box-sizing: border-box; } html { background-color: #ecf9ff; } body { color: #272727; font-family: 'Quicksand', serif; font-style: normal; font-weight: 400; letter-spacing: 0; padding: 1rem; } .main{ max-width: 1200px; margin: 0 auto; } h1 { font-size: 24px; font-weight: 400; text-align: center; } img { height: auto; max-width: 100%; vertical-align: middle; } .btn { color: #ffffff; padding: 0.8rem; font-size: 14px; text-transform: uppercase; border-radius: 4px; font-weight: 400; display: block; width: 100%; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.2); background: transparent; } .btn:hover { background-color: rgba(255, 255, 255, 0.12); } .cards { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; } .cards_item { display: flex; padding: 1rem; } @media (min-width: 40rem) { .cards_item { width: 50%; } } @media (min-width: 56rem) { .cards_item { width: 33.3333%; } } .card { background-color: white; border-radius: 0.25rem; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; overflow: hidden; } .card_content { padding: 1rem; background: linear-gradient(to bottom left, #EF8D9C 40%, #FFC39E 100%); } .card_title { color: #ffffff; font-size: 1.1rem; font-weight: 700; letter-spacing: 1px; text-transform: capitalize; margin: 0px; } .card_text { color: #ffffff; font-size: 0.875rem; line-height: 1.5; margin-bottom: 1.25rem; font-weight: 400; } .made_by{ font-weight: 400; font-size: 13px; margin-top: 35px; text-align: center; }
23
Responsive Card Grid Layout using Pure CSS
By:
pixeldev
Submit
@-webkit-keyframes { } @-webkit-keyframes extend { 0% { width: 600px; height: 200px; border-radius: 100px; } 10% { width: 610px; height: 210px; background: #fff; margin-left: - 5px; margin-top: - 5px; } 20% { width: 600px; height: 200px; background: #6fb07f; margin-left: 0px; margin-top: 0px; } 100% { width: 200px; height: 200px; border-radius: 100px; margin-left: 190px; background: #6fb07f; } } @keyframes extend { 0% { width: 600px; height: 200px; border-radius: 100px; } 10% { width: 610px; height: 210px; background: #fff; margin-left: - 5px; margin-top: - 5px; } 20% { width: 600px; height: 200px; background: #6fb07f; margin-left: 0px; margin-top: 0px; } 100% { width: 200px; height: 200px; border-radius: 100px; margin-left: 190px; background: #6fb07f; } } @-webkit-keyframes { } @-webkit-keyframes disappear { 0% { opacity: 1; } 20% { color: #fff; } 100% { opacity: 0; } } @keyframes disappear { 0% { opacity: 1; } 20% { color: #fff; } 100% { opacity: 0; } } @-webkit-keyframes { } @-webkit-keyframes appear { 0% { opacity: 0; } 70% { opacity: 0; } 100% { opacity: 1; } } @keyframes appear { 0% { opacity: 0; } 70% { opacity: 0; } 100% { opacity: 1; } } html { background: #fff } input, button, submit { border: none } .cont { position: absolute; width: 610px; height: 10px; left: 50%; top: 50%; margin: -100px 0 0 -300px } button { border-width: 1px; width: 600px; height: 200px; /*border-radius*/ border-radius: 100px; background: #fff; position: absolute; border: 5px solid #6fb07f } button > span { font-size: 48px; color: #6fb07f } img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); opacity: 0 } button:focus { /*animation*/ -webkit-animation: extend 1s ease-in-out; -ms-animation: extend 1s ease-in-out; animation: extend 1s ease-in-out; -webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */ animation-fill-mode: forwards } button:focus > span { /*animation*/ -webkit-animation: disappear 1s ease-in-out; -ms-animation: disappear 1s ease-in-out; animation: disappear 1s ease-in-out; -webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */ animation-fill-mode: forwards } button:focus > img { /*animation*/ -webkit-animation: appear 1s ease-in-out; -ms-animation: appear 1s ease-in-out; animation: appear 1s ease-in-out; -webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */ animation-fill-mode: forwards }
22
Submit Button pure css animation
By:
pixeldev
*, *:before, *:after { box-sizing: border-box; } body { overflow: hidden; } .hex { background: black; height: 3rem; width: 6rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%); transition: all 500ms cubic-bezier(.61,.01,.29,1.86); &:before, &:after { content:""; display: block; position: absolute; left: 0; } &:before { border-bottom: 2rem solid black; border-left: 3rem solid transparent; border-right: 3rem solid transparent; top: -2rem; } &:after { border-top: 2rem solid black; border-left: 3rem solid transparent; border-right: 3rem solid transparent; bottom: -2rem; } &:hover { transform: scale(3); transform-origin: 50%; transition: all 500ms cubic-bezier(.61,.01,.29,1.86) 500ms; } }
22
A Growing (Pure CSS) Hexagon
By:
pixeldev
Hover Me
h1::before { transform: scaleX(0); transform-origin: bottom right; } h1:hover::before { transform: scaleX(1); transform-origin: bottom left; } h1::before { content: " "; display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0 0 0 0; background: hsl(120 200% 80%); z-index: -1; transition: transform .3s ease; } h1 { position: relative; font-size: 5rem; } html { block-size: 100%; inline-size: 100%; } body { min-block-size: 100%; min-inline-size: 100%; margin: 0; box-sizing: border-box; display: grid; place-content: center; font-family: system-ui, sans-serif; } @media (orientation: landscape) { body { grid-auto-flow: column; } }
22
Mouse in and out Hover Effect
By:
Nethan Pogi
Pure CSS - file icons
with nice hover animation
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,600"); body { background-color: #fff; -webkit-font-smoothing: antialiased; font-smoothing: antialiased; height: 100vh; font-family: 'Open Sans', sans-serif; } h1 { font-size: 50px; text-align: center; font-weight: 300; color: #777; margin-bottom: 0; } h2 { text-align: center; text-transform: uppercase; letter-spacing: 3px; font-size: 16px; color: #bbb; } .icons { font-size: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } .icon { display: inline-block; width: 40px; height: 50px; border-radius: 2px; cursor: pointer; position: relative; margin: 0 5px; } .icon::after { content: ''; position: absolute; display: block; top: 0; right: 0; width: 0; height: 0; border-radius: 0 2px; transition: all 0.2s linear; backface-visibility: hidden; } /* DOC */ .icon--doc { background-color: #4285f4; } .icon--doc::after { background: linear-gradient(45deg, #669df6 50%, #fff 50%); } .icon--doc i::before { content: '☰'; } /* PDF */ .icon--pdf { background-color: #db4437; } .icon--pdf::after { background: linear-gradient(45deg, #e36a60 50%, #fff 50%); } .icon--pdf i::before { content: '☵'; } /* SHEETS */ .icon--sheets { background-color: #0f9d58; } .icon--sheets::after { background: linear-gradient(45deg, #39b378 50%, #fff 50%); } .icon--sheets i::before { content: '⊟'; } /* SLIDES */ .icon--slides { background-color: #f5b707; } .icon--slides::after { background: linear-gradient(45deg, #f8c53f 50%, #fff 50%); } .icon--slides i::before { content: '⧉'; } /* CODE */ .icon--code { background-color: #00a78e; } .icon--code::after { background: linear-gradient(45deg, #26bfa6 50%, #fff 50%); } .icon--code i::before { content: '< >'; } .icon i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: block; font-size: 10px; color: #fff; font-weight: 500; } .icon i::before, .icon i::after { display: block; transition: all 0.2s linear; } .icon i::before { text-align: center; font-size: 12px; opacity: 0; transform: translateY(5px); } .icon i::after { content: attr(title); transform: translateY(-5px); } .icon:hover { border-radius: 2px 4px 2px 2px; } .icon:hover::after { width: 12px; height: 12px; } .icon:hover i::before { transform: translateY(0); opacity: 1; } .icon:hover i::after { transform: translateY(0); }
22
Pure CSS – File icons with hover animation
By:
pixeldev
iOS 7 CSS
body { background: #5fadd3; } .weather { background-color: #1c77ec; background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1c77ec), to(#7deaff)); background-image: -moz-linear-gradient(top, #1c77ec, #7deaff); background-image: -ms-linear-gradient(top, #1c77ec, #7deaff); border-radius: 20px; width: 100px; height: 100px; display: inline-block; } .weather:hover { animation: jiggle 0.2s infinite; -webkit-animation: jiggle 0.2s infinite; -moz-animation-duration: 0.2s; -moz-animation-name: jiggle; -moz-animation-iteration-count: infinite; -webkit-transform: rotate(-1deg); -moz-transform: rotate(-1deg); } .sun { background-color: #fada0b; border-radius: 100%; width: 40px; height: 40px; top: 20px; left: 15px; position: relative; } .cloud-main { opacity: 0.9; background: #fff; width: 65px; height: 25px; border-radius: 20px; position: relative; left: 25px; top: 10px; } .cloud-bubble-one { opacity: 1.0; background: #fff; width: 35px; height: 35px; position: relative; border-radius: 100%; left: 10px; top: -15px; } .cloud-bubble-two { opacity: 1.0; background: #fff; width: 30px; height: 25px; position: relative; border-top-right-radius: 20px; border-bottom-right-radius: 10px; left: 35px; top: -40px; } .notes { background: #fed32c; border-radius: 20px; width: 100px; height: 100px; display: inline-block; } .notes:hover { animation: jiggle 0.2s infinite; -webkit-animation: jiggle 0.2s infinite; -moz-animation-duration: 0.2s; -moz-animation-name: jiggle; -moz-animation-iteration-count: infinite; -webkit-transform: rotate(-1deg); -moz-transform: rotate(-1deg); } .note { background: #fff; height: 70px; width: 100px; border-bottom-right-radius: 20px; border-bottom-left-radius: 20px; position: relative; top: 30px; border-top: 3px solid #b9a046; box-sizing:border-box; -moz-box-sizing:border-box; /* Firefox */ } .dotted-line { width: 100%; height: 3px; border-bottom: 3px dotted #acaead; position: relative; } .line { width: 100%; border-bottom: 2px solid #acaead; position: relative; height: 2px; padding-top: 15px; } .line-last { width: 90px; border-bottom: 2px solid #acaead; position: relative; height: 2px; padding-top: 15px; left: 5px; border-radius: 3px; } @keyframes jiggle { 0% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } } @-webkit-keyframes jiggle { 0% { -webkit-transform: rotate(-1deg); } 50% { -webkit-transform: rotate(1deg); } } @-moz-keyframes jiggle { 0% { -moz-transform: rotate(-1deg); } 50% { -moz-transform: rotate(1deg); } }
21
Pure CSS iOS 7 Icons hover w/ Jiggle Effect
By:
pixeldev
Pure Css Animated Background
@import url('https://fonts.googleapis.com/css?family=Exo:400,700'); *{ margin: 0px; padding: 0px; } body{ font-family: 'Exo', sans-serif; } .context { width: 100%; position: absolute; top:50vh; } .context h1{ text-align: center; color: #fff; font-size: 50px; } .area{ background: #4e54c8; background: -webkit-linear-gradient(to left, #8f94fb, #4e54c8); width: 100%; height:100vh; } .circles{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; } .circles li{ position: absolute; display: block; list-style: none; width: 20px; height: 20px; background: rgba(255, 255, 255, 0.2); animation: animate 25s linear infinite; bottom: -150px; } .circles li:nth-child(1){ left: 25%; width: 80px; height: 80px; animation-delay: 0s; } .circles li:nth-child(2){ left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 12s; } .circles li:nth-child(3){ left: 70%; width: 20px; height: 20px; animation-delay: 4s; } .circles li:nth-child(4){ left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 18s; } .circles li:nth-child(5){ left: 65%; width: 20px; height: 20px; animation-delay: 0s; } .circles li:nth-child(6){ left: 75%; width: 110px; height: 110px; animation-delay: 3s; } .circles li:nth-child(7){ left: 35%; width: 150px; height: 150px; animation-delay: 7s; } .circles li:nth-child(8){ left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 45s; } .circles li:nth-child(9){ left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 35s; } .circles li:nth-child(10){ left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 11s; } @keyframes animate { 0%{ transform: translateY(0) rotate(0deg); opacity: 1; border-radius: 0; } 100%{ transform: translateY(-1000px) rotate(720deg); opacity: 0; border-radius: 50%; } }
21
Animated Background
By:
Nethan Pogi
Normal State
Download
Hover state
Download
@import url(https://fonts.googleapis.com/css?family=Montserrat); *, *::after, *::before { box-sizing: border-box; } body { background: #39393A; font-size: 1.2rem; font-family: Montserrat; letter-spacing: 1px; color: white; } a { text-decoration: none; color: white; } em { font-style: normal; } section { width: 100%; height: 100vh; display: table; } section .center { display: table-cell; text-align: center; vertical-align: middle; } .button { position: relative; background: #E75A7C; display: inline-block; height: 60px; width: 200px; border-radius: 50em; box-shadow: 0 2px 20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.2); } span, em, i { position: absolute; width: 100%; height: 100%; left: 0; } span { overflow: hidden; } .button em { top: 0; line-height: 60px; } .button i { top: 100%; line-height: 60px; } .button:hover em, .button.hover em{ top: -100%; } .button:hover i, .button.hover i{ top: 0%; } em, i { transition: top 0.3s; } .button::before, .button::after { position: absolute; opacity: 0; visibility: hidden; transition: all 0.3s; } .button::before { content: 'File Size: 5mb'; width: 160px; height: 60px; background: #0E84A1; border-radius: 0.25em; bottom: 90px; line-height: 60px; left: calc(50% - 80px); font-size: 15px; } .button::after { content: ''; width: 0px; height: 0px; border: 10px solid transparent; border-top-color: #0E84A1; bottom: 70px; left: calc(50% - 10px); } .button:hover::before, .button:hover::after, .button.hover::before, .button.hover::after{ opacity: 1; visibility: visible; } .button:hover::before, .button.hover::before{ bottom: 80px; } .button:hover::after, .button.hover::after{ bottom: 60px; }
21
Animated Button with Tooltip (Pure CSS)
By:
pixeldev
Pure CSS Credit Card Type Icon
Placeholder
Visa
Mastercard
American Express
Discover
h1 { font-family: Arial, sans-serif; text-align: center; } h2, h3 { font-family: Arial, sans-serif; } .container { width: 600px; margin: auto; } ul { list-style: none; margin: 0; padding: 0; } li { width: 50%; float: left; } .card-type { display: inline-block; text-align: left; width: 60px; height: 40px; background-color: #c8c8c8; border-radius: 5px; position: relative; overflow: hidden; box-sizing: border-box; } .card-type::before, .card-type::after { content: ''; position: absolute; box-sizing: border-box; } .card-type.visa { background-color: #fff; border-top: solid #1E3F8E 13px; } .card-type.visa::before { background-color: #1E3F8E; border: solid #fff 4px; border-width: 5px 10px; width: 60px; height: 14px; top: 0; } .card-type.visa::after { width: 100%; height: 13px; background-color: #DF9600; bottom: 0; } .card-type.mastercard { background-color: #1D468F; } .card-type.mastercard::before, .card-type.mastercard::after { width: 22px; height: 22px; border-radius: 14px; top: 0; bottom: 0; margin: auto; } .card-type.mastercard::before { background-color: #DB2142; left: 12px; } .card-type.mastercard::after { background-color: #FEC627; right: 12px; } .card-type.amex { background-color: #CAE2C3; border: solid 3px #6F8668; border-bottom: none; } .card-type.amex::before { width: 16px; height: 24px; border-radius: 8px/12px; background-color: #6F8668; margin: auto; top: 0; bottom: 0; left: 0; right: 0; } .card-type.discover { background-color: #FF8A00; } .card-type.discover::before { width: 100px; height: 90px; border-radius: 50px/40px; background-color: #fff; top: -49px; left: -34px; } .card-type.discover::after { width: 30px; height: 4px; border-radius: 2px; background-color: #c8c8c8; margin: auto; top: 0; bottom: 0; right: 0; left: 0; }
20
Pure CSS Credit Card Type Icon
By:
pixeldev
About Me
Lorem ipsum dolor
Maecenas lacinia sem
Suspendisse fringilla
Portfolio
Lorem ipsum dolor
Maecenas dignissim fermentum luctus
Suspendisse fringilla
Lorem ipsum dolor
Maecenas lacinia sem
Suspendisse fringilla
Clients
Lorem ipsum dolor
Maecenas lacinia sem
Suspendisse fringilla
Contact Me
Lorem ipsum dolor
Maecenas dignissim fermentum luctus
Suspendisse fringilla
Support
* { margin: 0; padding: 0; box-sizing: border-box; } body { padding: 30px; font-family: "Helvetica Neue", helvetica, arial; background: url('https://subtlepatterns.com/patterns/white_carbonfiber.png'); } #container { position: relative; width: 940px; } #container:after { content: ""; display: block; clear: both; height: 0; } #menu { position: relative; float: left; width: 100%; padding: 0 20px; border-radius: 3px; box-shadow: inset 0 1px 1px rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.15); background: #ccc; } #menu, #menu ul { list-style: none; } #menu > li { float: left; position: relative; border-right: 1px solid rgba(0,0,0,.1); box-shadow: 1px 0 0 rgba(255,255,255,.25); perspective: 1000px; } #menu > li:first-child { border-left: 1px solid rgba(255,255,255,.25); box-shadow: -1px 0 0 rgba(0,0,0,.1), 1px 0 0 rgba(255,255,255,.25); } #menu a { display: block; position: relative; z-index: 10; padding: 13px 20px 13px 20px; text-decoration: none; color: rgba(75,75,75,1); line-height: 1; font-weight: 600; font-size: 12px; letter-spacing: -.05em; background: transparent; text-shadow: 0 1px 1px rgba(255,255,255,.9); transition: all .25s ease-in-out; } #menu > li:hover > a { background: #333; color: rgba(0,223,252,1); text-shadow: none; } #menu li ul { position: absolute; left: 0; z-index: 1; width: 200px; padding: 0; opacity: 0; visibility: hidden; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; background: transparent; overflow: hidden; transform-origin: 50% 0%; } #menu li:hover ul { padding: 15px 0; background: #333; opacity: 1; visibility: visible; box-shadow: 1px 1px 7px rgba(0,0,0,.5); animation-name: swingdown; animation-duration: 1s; animation-timing-function: ease; } @keyframes swingdown { 0% { opacity: .99999; transform: rotateX(90deg); } 30% { transform: rotateX(-20deg) rotateY(5deg); animation-timing-function: ease-in-out; } 65% { transform: rotateX(20deg) rotateY(-3deg); animation-timing-function: ease-in-out; } 100% { transform: rotateX(0); animation-timing-function: ease-in-out; } } #menu li li a { padding-left: 15px; font-weight: 400; color: #ddd; text-shadow: none; border-top: dotted 1px transparent; border-bottom: dotted 1px transparent; transition: all .15s linear; } #menu li li a:hover { color: rgba(0,223,252,1); border-top: dotted 1px rgba(255,255,255,.15); border-bottom: dotted 1px rgba(255,255,255,.15); background: rgba(0,223,252,.02); } * { margin: 0; padding: 0; box-sizing: border-box; } body { padding: 30px; font-family: "Helvetica Neue", helvetica, arial; background: url('https://subtlepatterns.com/patterns/white_carbonfiber.png'); } #container { position: relative; width: 940px; } #container:after { content: ""; display: block; clear: both; height: 0; } #menu { position: relative; float: left; width: 100%; padding: 0 20px; border-radius: 3px; box-shadow: inset 0 1px 1px rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.15), 0 1px 3px rgba(0,0,0,.15); background: #ccc; } #menu, #menu ul { list-style: none; } #menu > li { float: left; position: relative; border-right: 1px solid rgba(0,0,0,.1); box-shadow: 1px 0 0 rgba(255,255,255,.25); perspective: 1000px; } #menu > li:first-child { border-left: 1px solid rgba(255,255,255,.25); box-shadow: -1px 0 0 rgba(0,0,0,.1), 1px 0 0 rgba(255,255,255,.25); } #menu a { display: block; position: relative; z-index: 10; padding: 13px 20px 13px 20px; text-decoration: none; color: rgba(75,75,75,1); line-height: 1; font-weight: 600; font-size: 12px; letter-spacing: -.05em; background: transparent; text-shadow: 0 1px 1px rgba(255,255,255,.9); transition: all .25s ease-in-out; } #menu > li:hover > a { background: #333; color: rgba(0,223,252,1); text-shadow: none; } #menu li ul { position: absolute; left: 0; z-index: 1; width: 200px; padding: 0; opacity: 0; visibility: hidden; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; background: transparent; overflow: hidden; transform-origin: 50% 0%; } #menu li:hover ul { padding: 15px 0; background: #333; opacity: 1; visibility: visible; box-shadow: 1px 1px 7px rgba(0,0,0,.5); animation-name: swingdown; animation-duration: 1s; animation-timing-function: ease; } @keyframes swingdown { 0% { opacity: .99999; transform: rotateX(90deg); } 30% { transform: rotateX(-20deg) rotateY(5deg); animation-timing-function: ease-in-out; } 65% { transform: rotateX(20deg) rotateY(-3deg); animation-timing-function: ease-in-out; } 100% { transform: rotateX(0); animation-timing-function: ease-in-out; } } #menu li li a { padding-left: 15px; font-weight: 400; color: #ddd; text-shadow: none; border-top: dotted 1px transparent; border-bottom: dotted 1px transparent; transition: all .15s linear; } #menu li li a:hover { color: rgba(0,223,252,1); border-top: dotted 1px rgba(255,255,255,.15); border-bottom: dotted 1px rgba(255,255,255,.15); background: rgba(0,223,252,.02); }
20
Menu Swinging Animation
By:
Nethan Pogi
Previous
1
…
16
17
18
19
20
…
24
Next