Log in
Start Coding
All
Accordion
border
Buttons
Cards
Carousel
Css Animation
Hexagons
Hover
Layout
Loaders
Menu
Navigation
Slider
Tables
Wave
All
I am a
HTML
CSS
JAVASCRIPT
developer
body { display: flex; align-items: center; justify-content: center; min-height: 100vh;; } .slider-wrapper { font-size: 40px; text-transform: uppercase; display: flex; align-items: center; justify-content: center; } .slider { height: 50px; overflow: hidden; padding: 0 10px; } .slider > div { box-sizing: border-box; color: #FFF; height: 50px; margin-bottom: 50px; padding: 0 10px; text-align: center; } .text1 { background-color: #2ed573; animation: slide 5s linear infinite; } .text2 { background-color: #ffa502; } .text3 { background-color: #ff4757; } @keyframes slide { 0% { margin-top: -300px; } 5% { margin-top: -200px; } 33% { margin-top: -200px; } 38% { margin-top: -100px; } 66% { margin-top: -100px; } 72% { margin-top: -0; } 100% { margin-top: 0; } }
105
Text sliding animation
By:
pixeldev
body{ background: #373940; } .socket{ width: 200px; height: 200px; position: absolute; left: 50%; margin-left: -100px; top: 50%; margin-top: -100px; } .hex-brick{ background: #ABF8FF; width: 30px; height: 17px; position: absolute; top: 5px; animation-name: fade; animation-duration: 2s; animation-iteration-count: infinite; -webkit-animation-name: fade; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; } .h2{ transform: rotate(60deg); -webkit-transform: rotate(60deg); } .h3{ transform: rotate(-60deg); -webkit-transform: rotate(-60deg); } .gel{ height: 30px; width: 30px; transition: all .3s; -webkit-transition: all .3s; position: absolute; top: 50%; left: 50%; } .center-gel{ margin-left: -15px; margin-top: -15px; animation-name: pulse; animation-duration: 2s; animation-iteration-count: infinite; -webkit-animation-name: pulse; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; } .c1{ margin-left: -47px; margin-top: -15px; } .c2{ margin-left: -31px; margin-top: -43px; } .c3{ margin-left: 1px; margin-top: -43px; } .c4{ margin-left: 17px; margin-top: -15px; } .c5{ margin-left: -31px; margin-top: 13px; } .c6{ margin-left: 1px; margin-top: 13px; } .c7{ margin-left: -63px; margin-top: -43px; } .c8{ margin-left: 33px; margin-top: -43px; } .c9{ margin-left: -15px; margin-top: 41px; } .c10{ margin-left: -63px; margin-top: 13px; } .c11{ margin-left: 33px; margin-top: 13px; } .c12{ margin-left: -15px; margin-top: -71px; } .c13{ margin-left: -47px; margin-top: -71px; } .c14{ margin-left: 17px; margin-top: -71px; } .c15{ margin-left: -47px; margin-top: 41px; } .c16{ margin-left: 17px; margin-top: 41px; } .c17{ margin-left: -79px; margin-top: -15px; } .c18{ margin-left: 49px; margin-top: -15px; } .c19{ margin-left: -63px; margin-top: -99px; } .c20{ margin-left: 33px; margin-top: -99px; } .c21{ margin-left: 1px; margin-top: -99px; } .c22{ margin-left: -31px; margin-top: -99px; } .c23{ margin-left: -63px; margin-top: 69px; } .c24{ margin-left: 33px; margin-top: 69px; } .c25{ margin-left: 1px; margin-top: 69px; } .c26{ margin-left: -31px; margin-top: 69px; } .c27{ margin-left: -79px; margin-top: -15px; } .c28{ margin-left: -95px; margin-top: -43px; } .c29{ margin-left: -95px; margin-top: 13px; } .c30{ margin-left: 49px; margin-top: 41px; } .c31{ margin-left: -79px; margin-top: -71px; } .c32{ margin-left: -111px; margin-top: -15px; } .c33{ margin-left: 65px; margin-top: -43px; } .c34{ margin-left: 65px; margin-top: 13px; } .c35{ margin-left: -79px; margin-top: 41px; } .c36{ margin-left: 49px; margin-top: -71px; } .c37{ margin-left: 81px; margin-top: -15px; } .r1{ animation-name: pulse; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: .2s; -webkit-animation-name: pulse; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-delay: .2s; } .r2{ animation-name: pulse; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: .4s; -webkit-animation-name: pulse; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-delay: .4s; } .r3{ animation-name: pulse; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: .6s; -webkit-animation-name: pulse; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-delay: .6s; } .r1 > .hex-brick{ animation-name: fade; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: .2s; -webkit-animation-name: fade; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-delay: .2s; } .r2 > .hex-brick{ animation-name: fade; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: .4s; -webkit-animation-name: fade; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; -webkit-animation-delay: .4s; } .r3 > .hex-brick{ animation-name: fade; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: .6s; -webkit-animation-name: fade; -webkit-animation-duration: 2s; -webkit-animation-iteration-count: infinite; } @keyframes pulse{ 0%{-webkit-transform: scale(1); transform: scale(1); } 50%{-webkit-transform: scale(0.01); transform: scale(0.01); } 100%{-webkit-transform: scale(1); transform: scale(1); } } @keyframes fade{ 0%{ background: #ABF8FF; } 50%{ background: #90BBBF; } 100%{ background: #ABF8FF; } } @-webkit-keyframes pulse{ 0%{-webkit-transform: scale(1); transform: scale(1); } 50%{ -webkit-transform: scale(0.01); transform: scale(0.01); } 100%{-webkit-transform: scale(1); transform: scale(1); } } @-webkit-keyframes fade{ 0%{ background: #ABF8FF; } 50%{ background: #389CA6; } 100%{ background: #ABF8FF; } }
104
Hexagonal Loading Animation
By:
pixeldev
.loadingspinner { --square: 26px; --offset: 30px; --duration: 2.4s; --delay: 0.2s; --timing-function: ease-in-out; --in-duration: 0.4s; --in-delay: 0.1s; --in-timing-function: ease-out; width: calc( 3 * var(--offset) + var(--square)); height: calc( 2 * var(--offset) + var(--square)); padding: 0px; margin-left: auto; margin-right: auto; margin-top: 10px; margin-bottom: 30px; position: relative; } .loadingspinner div { display: inline-block; background: darkorange; /*background: var(--text-color);*/ /*box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);*/ border: none; border-radius: 2px; width: var(--square); height: var(--square); position: absolute; padding: 0px; margin: 0px; font-size: 6pt; color: black; } .loadingspinner #square1 { left: calc( 0 * var(--offset) ); top: calc( 0 * var(--offset) ); animation: square1 var(--duration) var(--delay) var(--timing-function) infinite, squarefadein var(--in-duration) calc(1 * var(--in-delay)) var(--in-timing-function) both; } .loadingspinner #square2 { left: calc( 0 * var(--offset) ); top: calc( 1 * var(--offset) ); animation: square2 var(--duration) var(--delay) var(--timing-function) infinite, squarefadein var(--in-duration) calc(1 * var(--in-delay)) var(--in-timing-function) both; } .loadingspinner #square3 { left: calc( 1 * var(--offset) ); top: calc( 1 * var(--offset) ); animation: square3 var(--duration) var(--delay) var(--timing-function) infinite, squarefadein var(--in-duration) calc(2 * var(--in-delay)) var(--in-timing-function) both; } .loadingspinner #square4 { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); animation: square4 var(--duration) var(--delay) var(--timing-function) infinite, squarefadein var(--in-duration) calc(3 * var(--in-delay)) var(--in-timing-function) both; } .loadingspinner #square5 { left: calc( 3 * var(--offset) ); top: calc( 1 * var(--offset) ); animation: square5 var(--duration) var(--delay) var(--timing-function) infinite, squarefadein var(--in-duration) calc(4 * var(--in-delay)) var(--in-timing-function) both; } @keyframes square1 { 0% { left: calc( 0 * var(--offset) ); top: calc( 0 * var(--offset) ); } 8.333% { left: calc( 0 * var(--offset) ); top: calc( 1 * var(--offset) ); } 100% { left: calc( 0 * var(--offset) ); top: calc( 1 * var(--offset) ); } } @keyframes square2 { 0% { left: calc( 0 * var(--offset) ); top: calc( 1 * var(--offset) ); } 8.333% { left: calc( 0 * var(--offset) ); top: calc( 2 * var(--offset) ); } 16.67% { left: calc( 1 * var(--offset) ); top: calc( 2 * var(--offset) ); } 25.00% { left: calc( 1 * var(--offset) ); top: calc( 1 * var(--offset) ); } 83.33% { left: calc( 1 * var(--offset) ); top: calc( 1 * var(--offset) ); } 91.67% { left: calc( 1 * var(--offset) ); top: calc( 0 * var(--offset) ); } 100% { left: calc( 0 * var(--offset) ); top: calc( 0 * var(--offset) ); } } @keyframes square3 { 0%,100% { left: calc( 1 * var(--offset) ); top: calc( 1 * var(--offset) ); } 16.67% { left: calc( 1 * var(--offset) ); top: calc( 1 * var(--offset) ); } 25.00% { left: calc( 1 * var(--offset) ); top: calc( 0 * var(--offset) ); } 33.33% { left: calc( 2 * var(--offset) ); top: calc( 0 * var(--offset) ); } 41.67% { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); } 66.67% { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); } 75.00% { left: calc( 2 * var(--offset) ); top: calc( 2 * var(--offset) ); } 83.33% { left: calc( 1 * var(--offset) ); top: calc( 2 * var(--offset) ); } 91.67% { left: calc( 1 * var(--offset) ); top: calc( 1 * var(--offset) ); } } @keyframes square4 { 0% { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); } 33.33% { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); } 41.67% { left: calc( 2 * var(--offset) ); top: calc( 2 * var(--offset) ); } 50.00% { left: calc( 3 * var(--offset) ); top: calc( 2 * var(--offset) ); } 58.33% { left: calc( 3 * var(--offset) ); top: calc( 1 * var(--offset) ); } 100% { left: calc( 3 * var(--offset) ); top: calc( 1 * var(--offset) ); } } @keyframes square5 { 0% { left: calc( 3 * var(--offset) ); top: calc( 1 * var(--offset) ); } 50.00% { left: calc( 3 * var(--offset) ); top: calc( 1 * var(--offset) ); } 58.33% { left: calc( 3 * var(--offset) ); top: calc( 0 * var(--offset) ); } 66.67% { left: calc( 2 * var(--offset) ); top: calc( 0 * var(--offset) ); } 75.00% { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); } 100% { left: calc( 2 * var(--offset) ); top: calc( 1 * var(--offset) ); } } @keyframes squarefadein { 0% { transform: scale(0.75); opacity: 0.0; } 100% { transform: scale(1.0); opacity: 1.0; } }
102
Tetris Block Loader
By:
pixeldev
Simple CSS loaders
single html element css animation
.loader { --color: white; --size-mid: 6vmin; --size-dot: 1.5vmin; --size-bar: 0.4vmin; --size-square: 3vmin; display: block; position: relative; width: 50%; display: grid; place-items: center; } .loader::before, .loader::after { content: ''; box-sizing: border-box; position: absolute; } /** loader --1 **/ .loader.--1::before { width: var(--size-mid); height: var(--size-mid); border: 4px solid var(--color); border-top-color: transparent; border-radius: 50%; animation: loader-1 1s linear infinite; } .loader.--1::after { width: calc(var(--size-mid) - 2px); height: calc(var(--size-mid) - 2px); border: 2px solid transparent; border-top-color: var(--color); border-radius: 50%; animation: loader-1 0.6s linear reverse infinite; } @keyframes loader-1 { 100% { transform: rotate(1turn); } } /** loader --2 **/ .loader.--2::before, .loader.--2::after { width: var(--size-dot); height: var(--size-dot); background-color: var(--color); border-radius: 50%; opacity: 0; animation: loader-2 0.8s cubic-bezier(0.2, 0.32, 0, 0.87) infinite; } .loader.--2::after { animation-delay: 0.3s; } @keyframes loader-2 { 0%, 80%, 100% { opacity: 0; } 33% { opacity: 1; } 0%, 100% { transform: translateX(-4vmin); } 90% { transform: translateX(4vmin); } } /** loader --3 **/ .loader.--3::before, .loader.--3::after { width: var(--size-dot); height: var(--size-dot); background-color: var(--color); border-radius: 50%; animation: loader-3 1.2s ease-in-out infinite; } .loader.--3::before { left: calc(50% - 1.6vmin - var(--size-dot)); } .loader.--3::after { left: calc(50% + 1.6vmin); animation-delay: -0.4s; } @keyframes loader-3 { 0%, 100% { transform: translateY(-2.6vmin); } 44% { transform: translateY(2.6vmin); } } /** loader --4 **/ .loader.--4::before { height: var(--size-bar); width: 6vmin; background-color: var(--color); animation: loader-4 0.8s cubic-bezier(0, 0, 0.03, 0.9) infinite; } @keyframes loader-4 { 0%, 44%, 88.1%, 100% { transform-origin: left; } 0%, 100%, 88% { transform: scaleX(0); } 44.1%, 88% { transform-origin: right; } 33%, 44% { transform: scaleX(1); } } /** loader --5 **/ .loader.--5::before, .loader.--5::after { height: 3vmin; width: var(--size-bar); background-color: var(--color); animation: loader-5 0.6s cubic-bezier(0, 0, 0.03, 0.9) infinite; } .loader.--5::before { left: calc(50% - 1vmin); top: calc(50% - 3vmin); } .loader.--5::after { left: calc(50% + 1vmin); top: calc(50% - 1vmin); animation-delay: 0.2s; } @keyframes loader-5 { 0%, 88%, 100% { opacity: 0; } 0% { transform: translateY(-6vmin); } 33% { opacity: 1; } 33%, 88% { transform: translateY(3vmin); } } /** loader --6 **/ .loader.--6::before { width: var(--size-square); height: var(--size-square); background-color: var(--color); top: calc(50% - var(--size-square)); left: calc(50% - var(--size-square)); animation: loader-6 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite; } @keyframes loader-6 { 0%, 100% { transform: none; } 25% { transform: translateX(100%); } 50% { transform: translateX(100%) translateY(100%); } 75% { transform: translateY(100%); } } /** loader --7 **/ .loader.--7::before, .loader.--7::after { width: var(--size-square); height: var(--size-square); background-color: var(--color); } .loader.--7::before { top: calc(50% - var(--size-square)); left: calc(50% - var(--size-square)); animation: loader-6 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite; } .loader.--7::after { top: 50%; left: 50%; animation: loader-7 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite; } @keyframes loader-7 { 0%, 100% { transform: none; } 25% { transform: translateX(-100%); } 50% { transform: translateX(-100%) translateY(-100%); } 75% { transform: translateY(-100%); } } /** loader --8 **/ .loader.--8::before, .loader.--8::after { width: var(--size-dot); height: var(--size-dot); border-radius: 50%; background-color: var(--color); } .loader.--8::before { top: calc(50% + 4vmin); animation: loader-8-1 0.8s cubic-bezier(0.06, 0.01, 0.49, 1.18) infinite; } .loader.--8::after { opacity: 0; top: calc(50% - 2vmin); animation: loader-8-2 0.8s cubic-bezier(0.46,-0.1, 0.27, 1.07) 0.2s infinite; } @keyframes loader-8-1 { 0%, 55%, 100% { opacity: 0; } 0% { transform: scale(0.2); } 22% { opacity: 1; } 33%, 55% { transform: scale(1) translateY(-6vmin); } } @keyframes loader-8-2 { 0%, 100% { opacity: 0; } 33% { opacity: 0.3; } 0% { transform: scale(0); } 100% { transform: scale(4); } } /** loader --9 **/ .loader.--9::before, .loader.--9::after { width: var(--size-dot); height: var(--size-dot); border-radius: 50%; background-color: var(--color); animation: loader-9 0.42s cubic-bezier(0.39, 0.31, 0, 1.11) infinite; } .loader.--9::before { left: calc(50% - var(--size-dot) - 1.6vmin); } .loader.--9::after { left: calc(50% + 1.6vmin); animation-delay: 0.12s; } @keyframes loader-9 { 0%, 100% { opacity: 0; } 0% { transform: translate(-4vmin, -4vmin); } 66% { opacity: 1; } 66%, 100% { transform: none; } } /** miscs **/ .container { display: grid; grid-template-columns: repeat(3, 18vmin); grid-template-rows: repeat(3, 18vmin); grid-gap: 1vmin; } .item { background: rgba(255, 255, 255, 0.1); display: grid; place-items: center; border-radius: 4px; transition: opacity 0.4s ease; } .container:hover .item { opacity: 0.3; } .container:hover .item:hover { opacity: 1; } .page { margin: auto; } .header { margin-bottom: 4vmin; } .header-title { font-size: 3.75vmin; } .header-subtitle { font-size: 2vmin; text-transform: uppercase; opacity: 0.6; } html, body { display: flex; width: 100%; height: 100%; background-image: linear-gradient(to right top, #051937, #004d7a, #008793, #00bf72, #a8eb12); font-family: 'Noto Sans', sans-serif; color: white; text-align: center; letter-spacing: 0.3px; }
101
Simple CSS loaders
By:
pixeldev
Bouncy
body { font-family: arial; background: -webkit-radial-gradient(circle, #757462, #272623); background: -moz-radial-gradient(circle, #757462, #272623); } h1 { -webkit-animation: bounceSide .5s cubic-bezier(.63,.09,.75,.46) infinite alternate; -moz-animation: bounceSide .5s cubic-bezier(.63,.09,.75,.46) infinite alternate; position: relative; float: left; color: white; } .object-1 { position: absolute; width: 100px; height: 100px; border-radius: 50%; left: 50%; background: #ffcc00; -webkit-animation: bounce .3s cubic-bezier(.63,.09,.75,.46) infinite alternate; -moz-animation: bounce .3s cubic-bezier(.63,.09,.75,.46) infinite alternate; } .object-2 { position: absolute; width: 100px; height: 100px; border-radius: 50%; left: 25%; background: #00ccff; -webkit-animation: bounce .7s cubic-bezier(.63,.09,.75,.46) infinite alternate; -moz-animation: bounce .7s cubic-bezier(.63,.09,.75,.46) infinite alternate; } .object-3 { position: absolute; width: 100px; height: 100px; border-radius: 10%; left: 75%; background: #00cc00; -webkit-animation: bounce .2s cubic-bezier(.63,.09,.75,.46) infinite alternate; -moz-animation: bounce .2s cubic-bezier(.63,.09,.75,.46) infinite alternate; } @-webkit-keyframes bounce { 0%, 10% { top: 10px; height: 100px; width: 100px; } 15% { height: 103px; width: 97px; } 35% { height: 105px; width: 95px; } 75% { height: 107px; width: 95px; } 85% { height: 107px; width: 95px; } 100% { top: 200px; height: 80px; width: 105px; } } @-moz-keyframes bounce { 0%, 10% { top: 10px; height: 100px; width: 100px; } 15% { height: 103px; width: 97px; } 35% { height: 105px; width: 95px; } 75% { height: 107px; width: 95px; } 85% { height: 107px; width: 95px; } 100% { top: 200px; height: 80px; width: 105px; } } @-webkit-keyframes bounceSide { 0% { left: 10px; } 100% { left: 200px; } } @-moz-keyframes bounceSide { 0% { left: 10px; } 100% { left: 200px; } }
101
Bouncing
By:
pixeldev
body { margin: 0; padding: 0; box-sizing: border-box; background: dodgerblue; } .line { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-bottom: 3px solid white; animation: line 2s linear infinite; height: 50px; width: 500px; } .hexagon { position: absolute; width: 80px; height: 50px; background: #fff; left: 0; bottom: 20px; animation: linee 2s linear infinite; } .hexagon:before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; transform: rotate(60deg); } .hexagon:after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #fff; transform: rotate(-60deg); } @keyframes linee { 0% { transform: rotate(0deg); left: 0; } 50% { transform: rotate(360deg); left: 420px; } 100% { transform: rotate(0deg); left: 0; } } @keyframes line { 0% { transform: translate(-50%, -50%) rotate(30deg); } 25% { transform: translate(-50%, -50%) rotate(0deg); } 50% { transform: translate(-50%, -50%) rotate(-30deg); } 75% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(30deg); } }
100
Sliding Hexagon Loading Animation – Pure Css Tutorials – Css Animation Effects
By:
pixeldev
HOME
BAKERY
Cake
Bread
Patisserie
ORDER
CONTACT
/*------------------- Reset browser CSS -------------------*/ * { padding: 0px; margin: 0px; border: 0 none; box-sizing: border-box; } body { width: 100%; height: 100%; min-height: 400px; background-color: #ffffff; font-family: 'Josefin Sans', Arial, sans-serif; font-style: normal; } /*--------------------- Header Styling ---------------------*/ /* header container */ header { position: relative; height: 100px; width: 100%; min-width: 800px; background: #cbf3f0; } /* navbar container */ #mainmenu-navbar { position: absolute; bottom: 0px; right: 0px; margin-right: 15px; } /* navbar items */ .main-menu.tab > li { list-style: none; display: inline-block; position: relative; min-width: 150px; padding: 0.5em; margin: 0px 5px; font-size: 16pt; text-align: center; text-transform: uppercase; line-height: 1.3em; } /* submenu container */ .dropdown.container { display: none; } /*------------------ Navbar Text ------------------*/ a { text-decoration: none; } .main-menu.tab a { color: #2ec4b6; } .dropdown.container a { color: #ffffff; font-weight: 300; text-transform: capitalize; } /*------------------- Hover Styles -------------------*/ /* main menu items */ .main-menu.tab > li:hover > a { color: #26a195; } /* submenu title */ li.dropdown.tab:hover > a { color: #cbf3f0; } /* submenu title background */ .dropdown.tab:hover { background: #26a195; } /* submenu container */ .dropdown.tab:hover .dropdown.container { display: block; position: absolute; top: 2.3em; /* 1.3em + 2 * 0.5em */ left: 0px; margin-top: -1px; padding: 1em 0em; background: #2ec4b6; } /* submenu items */ .dropdown.tab:hover li { list-style: none; line-height: 1em; text-align: left; padding: 0.5em; min-width: 150px; } /* submenu item highlight */ .dropdown.container > li:hover { background: #ff9f1c; } /**** end of header styling ****/
100
Header navigation menu with dropdown on hover (pure CSS)
By:
pixeldev
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
HOME
ARTICLES
PORTFOLIO
ABOUT
CONTACT
html, body { margin: 0px; } header, footer { font-family: Raleway; margin: 0 auto; padding: 5em 3em; text-align: center; background: #555; } header h1 { color: #AAA; font-size: 40px; font-weight: lighter; margin-bottom: 5px; } header span { color: #222; } footer span { color: #AAA; } div.container { font-family: Raleway; margin: 0 auto; padding: 10em 3em; text-align: center; } div.container a { color: #FFF; text-decoration: none; font: 20px Raleway; margin: 0px 10px; padding: 10px 10px; position: relative; z-index: 0; cursor: pointer; } .red { background: #f44336; } .purple { background: #673ab7; } .indigo { background: #3f51b5; } .blue { background: #2196f3; } .cyan { background: #00bcd4; } .teal { background: #009688; } .green { background: #4caf50; } .lightGreen { background: #8bc34a; } .lime { background: #c0ca33; } .yellow { background: #fdd835; } .amber { background: #ffc107; } .orange { background: #ff9800 } .deepOrange { background: #ff5722; } .brown { background: #795548; } .gray { background: #9e9e9e; } /* Top and Bottom borders go out */ div.topBotomBordersOut a:before, div.topBotomBordersOut a:after { position: absolute; left: 0px; width: 100%; height: 2px; background: #FFF; content: ""; opacity: 0; transition: all 0.3s; } div.topBotomBordersOut a:before { top: 0px; transform: translateY(10px); } div.topBotomBordersOut a:after { bottom: 0px; transform: translateY(-10px); } div.topBotomBordersOut a:hover:before, div.topBotomBordersOut a:hover:after { opacity: 1; transform: translateY(0px); } /* Top and Bottom borders come in */ div.topBotomBordersIn a:before, div.topBotomBordersIn a:after { position: absolute; left: 0px; width: 100%; height: 2px; background: #FFF; content: ""; opacity: 0; transition: all 0.3s; } div.topBotomBordersIn a:before { top: 0px; transform: translateY(-10px); } div.topBotomBordersIn a:after { bottom: 0px; transform: translateY(10px); } div.topBotomBordersIn a:hover:before, div.topBotomBordersIn a:hover:after { opacity: 1; transform: translateY(0px); } /* Top border go down and Left border appears */ div.topLeftBorders a:before { position: absolute; top: 0px; left: 0px; width: 2px; height: 0px; background: #FFF; content: ""; opacity: 1; transition: all 0.3s; } div.topLeftBorders a:after { position: absolute; top: 0px; left: 0px; width: 100%; height: 2px; background: #FFF; content: ""; opacity: 1; transition: all 0.3s; } div.topLeftBorders a:hover:before { height: 100%; } div.topLeftBorders a:hover:after { opacity: 0; top: 100%; } /* Circle behind */ div.circleBehind a:before, div.circleBehind a:after { position: absolute; top: 22px; left: 50%; width: 50px; height: 50px; border: 4px solid #0277bd; transform: translateX(-50%) translateY(-50%) scale(0.8); border-radius: 50%; background: transparent; content: ""; opacity: 0; transition: all 0.3s; z-index: -1; } div.circleBehind a:after { border-width: 2px; transition: all 0.4s; } div.circleBehind a:hover:before { opacity: 1; transform: translateX(-50%) translateY(-50%) scale(1); } div.circleBehind a:hover:after { opacity: 1; transform: translateX(-50%) translateY(-50%) scale(1.3); } /* Brackets go out */ div.brackets a:before, div.brackets a:after { position: absolute; opacity: 0; font-size: 35px; top: 0px; transition: all 0.3s; } div.brackets a:before { content: '('; left: 0px; transform: translateX(10px); } div.brackets a:after { content: ')'; right: 0px; transform: translateX(-10px); } div.brackets a:hover:before, div.brackets a:hover:after { opacity: 1; transform: translateX(0px); } /* Border from Y to X */ div.borderYtoX a:before, div.borderYtoX a:after { position: absolute; opacity: 0.5; height: 100%; width: 2px; content: ''; background: #FFF; transition: all 0.3s; } div.borderYtoX a:before { left: 0px; top: 0px; } div.borderYtoX a:after { right: 0px; bottom: 0px; } div.borderYtoX a:hover:before, div.borderYtoX a:hover:after { opacity: 1; height: 2px; width: 100%; } /* Border X get width */ div.borderXwidth a:before, div.borderXwidth a:after { position: absolute; opacity: 0; width: 0%; height: 2px; content: ''; background: #FFF; transition: all 0.3s; } div.borderXwidth a:before { left: 0px; top: 0px; } div.borderXwidth a:after { right: 0px; bottom: 0px; } div.borderXwidth a:hover:before, div.borderXwidth a:hover:after { opacity: 1; width: 100%; } /* Pull down */ div.pullDown a:before { position: absolute; width: 100%; height: 2px; left: 0px; top: 0px; content: ''; background: #FFF; opacity: 0.3; transition: all 0.3s; } div.pullDown a:hover:before { height: 100%; } /* Pull up */ div.pullUp a:before { position: absolute; width: 100%; height: 2px; left: 0px; bottom: 0px; content: ''; background: #FFF; opacity: 0.3; transition: all 0.3s; } div.pullUp a:hover:before { height: 100%; } /* Pull right */ div.pullRight a:before { position: absolute; width: 2px; height: 100%; left: 0px; top: 0px; content: ''; background: #FFF; opacity: 0.3; transition: all 0.3s; } div.pullRight a:hover:before { width: 100%; } /* Pull left */ div.pullLeft a:before { position: absolute; width: 2px; height: 100%; right: 0px; top: 0px; content: ''; background: #FFF; opacity: 0.3; transition: all 0.3s; } div.pullLeft a:hover:before { width: 100%; } /* Pull up and down */ div.pullUpDown a:before, div.pullUpDown a:after { position: absolute; width: 100%; height: 2px; left: 0px; content: ''; background: #FFF; opacity: 0.3; transition: all 0.3s; } div.pullUpDown a:before { top: 0px; } div.pullUpDown a:after { bottom: 0px; } div.pullUpDown a:hover:before, div.pullUpDown a:hover:after { height: 100%; } /* Pull right and left */ div.pullRightLeft a:before, div.pullRightLeft a:after { position: absolute; width: 2px; height: 100%; top: 0px; content: ''; background: #FFF; opacity: 0.3; transition: all 0.3s; } div.pullRightLeft a:before { left: 0px; } div.pullRightLeft a:after { right: 0px; } div.pullRightLeft a:hover:before, div.pullRightLeft a:hover:after { width: 100%; } /* Highlight text out */ div.highlightTextOut a { color: rgba(255, 255, 255, 0.3); } div.highlightTextOut a:before, div.highlightTextIn a:before { position: absolute; color: #FFF; top: 0px; left: 0px; padding: 10px; overflow: hidden; content: attr(alt); transition: all 0.3s; transform: scale(0.8); opacity: 0; } div.highlightTextOut a:hover:before, div.highlightTextIn a:hover:before { transform: scale(1); opacity: 1; } /* Highlight text in */ div.highlightTextIn a { color: rgba(0, 0, 0, 0.4); } div.highlightTextIn a:before { transform: scale(1.2); }
99
Navigation Animation
By:
pixeldev
CSS3 loading animation.
Simple.
Clear.
Pure.
Simple.
* { font-family: 'Roboto',sans-serif; } h1, p { text-align: center; font-weight: 300; } h1 { font-size: 2em; } .word-spinner { font-size: 2em; height: 2em; line-height: 2em; overflow: hidden; } .word-spinner > span { display: block; } .word-spinner > span { position: relative; display: block; text-align: center; top: -100%; animation: wordspin 5s infinite; -webkit-animation: wordspin 5s infinite; } /* spinning animation */ @keyframes wordspin { 0% { top: 0%; } 33% { top: -100%; } 66% { top: -200%; } 100% { top: -300%; } } @-webkit-keyframes wordspin /*Safari and Chrome*/ { 0% { top: 0%; } 33% { top: -100%; } 66% { top: -200%; } 100% { top: -300%; } } /* loader div */ #loader2 { width: 16em; height: 16em; margin: 6em auto 6em auto; font-size: 12px; background-color: white; border-left: 1.6em solid #3399FF; border-right: 1.6em solid #3399FF; border-top: 1.6em solid transparent; border-bottom: 1.6em solid transparent; border-radius: 100%; -webkit-border-radius: 100%; animation: loader 1s infinite; -webkit-animation: loader 1s infinite; } /* spinning animation */ @keyframes loader { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @-webkit-keyframes loader /*Safari and Chrome*/ { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } .ownlink { color: #3399FF; text-decoration: none; font-style: italic; }
98
Loading Animation v2
By:
pixeldev
body, html { width: 100vw; height: 100vh; } body { background-image: linear-gradient(135deg, hsl(var(--hue) 20% 95%), hsl(var(--hue) 20% 80%)); display: flex; align-items: center; justify-content: center; --hue: 220deg; --width: 23rem; --accent-hue: 22deg; --duration: 0.6s; --easing: cubic-bezier(1, 0, 1, 1); } input { display: none; } .switch { --shadow-offset: calc(var(--width) / 20); position: relative; cursor: pointer; display: flex; align-items: center; width: var(--width); height: calc(var(--width) / 2.5); border-radius: var(--width); box-shadow: inset 10px 10px 10px hsl(var(--hue) 20% 80%), inset -10px -10px 10px hsl(var(--hue) 20% 93%); } .indicator { content: ''; position: absolute; width: 40%; height: 60%; transition: all var(--duration) var(--easing); box-shadow: inset 0 0 2px hsl(var(--hue) 20% 15% / 60%), inset 0 0 3px 2px hsl(var(--hue) 20% 15% / 60%), inset 0 0 5px 2px hsl(var(--hue) 20% 45% / 60%); } .indicator.left { --hue: var(--accent-hue); overflow: hidden; left: 10%; border-radius: 100px 0 0 100px; background: linear-gradient(180deg, hsl(calc(var(--accent-hue) + 20deg) 95% 80%) 10%, hsl(calc(var(--accent-hue) + 20deg) 100% 60%) 30%, hsl(var(--accent-hue) 90% 50%) 60%, hsl(var(--accent-hue) 90% 60%) 75%, hsl(var(--accent-hue) 90% 50%)); } .indicator.left::after { content: ''; position: absolute; opacity: 0.6; width: 100%; height: 100%; background: url("data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZycKICB4bWxuczp4bGluaz0naHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluaycKICB3aWR0aD0nNTAwJyBoZWlnaHQ9JzUwMCc+CgogICAgPGZpbHRlciBpZD0nbm9pc2UnIHg9JzAnIHk9JzAnPgogICAgICA8ZmVUdXJidWxlbmNlCiAgICAgICAgdHlwZT0nZnJhY3RhbE5vaXNlJwogICAgICAgIGJhc2VGcmVxdWVuY3k9JzAuNjUnCiAgICAgICAgbnVtT2N0YXZlcz0nMycKICAgICAgICBzdGl0Y2hUaWxlcz0nc3RpdGNoJwogICAgICAvPgogICAgICA8ZmVCbGVuZCBtb2RlPSJzY3JlZW4iLz4KICAgIDwvZmlsdGVyPgoKICAgIDxyZWN0IHdpZHRoPSc1MDAnIGhlaWdodD0nNTAwJyBmaWx0ZXI9InVybCgjbm9pc2UpIiBvcGFjaXR5PScwLjUnLz4KPC9zdmc+"); } .indicator.right { right: 10%; border-radius: 0 100px 100px 0; background-image: linear-gradient(180deg, hsl(var(--hue) 20% 95%), hsl(var(--hue) 20% 65%) 60%, hsl(var(--hue) 20% 70%) 70%, hsl(var(--hue) 20% 65%)); } .button { position: absolute; z-index: 1; width: 55%; height: 80%; left: 5%; border-radius: 100px; background-image: linear-gradient(160deg, hsl(var(--hue) 20% 95%) 40%, hsl(var(--hue) 20% 65%) 70%); transition: all var(--duration) var(--easing); box-shadow: 2px 2px 3px hsl(var(--hue) 18% 50% / 80%), 2px 2px 6px hsl(var(--hue) 18% 50% / 40%), 10px 20px 10px hsl(var(--hue) 18% 50% / 40%), 20px 30px 30px hsl(var(--hue) 18% 50% / 60%); } .button::before, .button::after { content: ''; position: absolute; top: 10%; width: 41%; height: 80%; border-radius: 100%; } .button::before { left: 5%; box-shadow: inset 1px 1px 2px hsl(var(--hue) 20% 85%); background-image: linear-gradient(-50deg, hsl(var(--hue) 20% 95%) 20%, hsl(var(--hue) 20% 85%) 80%); } .button::after { right: 5%; box-shadow: inset 1px 1px 3px hsl(var(--hue) 20% 70%); background-image: linear-gradient(-50deg, hsl(var(--hue) 20% 95%) 20%, hsl(var(--hue) 20% 75%) 80%); } input:checked ~ .button { left: 40%; } input:not(:checked) ~ .indicator.left, input:checked ~ .indicator.right { box-shadow: inset 0 0 5px hsl(var(--hue) 20% 15% / 100%), inset 20px 20px 10px hsl(var(--hue) 20% 15% / 100%), inset 20px 20px 15px hsl(var(--hue) 20% 45% / 100%); }
98
3D Switch
By:
pixeldev
Neon button
Neon button
Neon button
*{ margin: 0; padding: 0; box-sizing: border-box; } body{ display: flex; justify-content: center; align-items: center; height: 100vh; background: #050801; font-family: 'Raleway', sans-serif; font-weight: bold; } a{ position: relative; display: inline-block; padding: 25px 30px; margin: 40px 0; color: #03e9f4; text-decoration: none; text-transform: uppercase; transition: 0.5s; letter-spacing: 4px; overflow: hidden; margin-right: 50px; } a:hover{ background: #03e9f4; color: #050801; box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #03e9f4, 0 0 200px #03e9f4; -webkit-box-reflect:below 1px linear-gradient(transparent, #0005); } a:nth-child(1){ filter: hue-rotate(270deg); } a:nth-child(2){ filter: hue-rotate(110deg); } a span{ position: absolute; display: block; } a span:nth-child(1){ top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg,transparent,#03e9f4); animation: animate1 1s linear infinite; } @keyframes animate1{ 0%{ left: -100%; } 50%,100%{ left: 100%; } } a span:nth-child(2){ top: -100%; right: 0; width: 2px; height: 100%; background: linear-gradient(180deg,transparent,#03e9f4); animation: animate2 1s linear infinite; animation-delay: 0.25s; } @keyframes animate2{ 0%{ top: -100%; } 50%,100%{ top: 100%; } } a span:nth-child(3){ bottom: 0; right: 0; width: 100%; height: 2px; background: linear-gradient(270deg,transparent,#03e9f4); animation: animate3 1s linear infinite; animation-delay: 0.50s; } @keyframes animate3{ 0%{ right: -100%; } 50%,100%{ right: 100%; } } a span:nth-child(4){ bottom: -100%; left: 0; width: 2px; height: 100%; background: linear-gradient(360deg,transparent,#03e9f4); animation: animate4 1s linear infinite; animation-delay: 0.75s; } @keyframes animate4{ 0%{ bottom: -100%; } 50%,100%{ bottom: 100%; } }
95
Glowing buttons
By:
pixeldev
body { height: 100%; background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%); overflow: hidden; } input { display: none; } #wrap { position: absolute; top: 50%; left: 50%; height: 400px; width: 400px; border: 1px solid #FFFF00; -moz-transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); transform: translate(-50%,-50%); overflow: hidden; } .starfield { position: absolute; top: 50%; left: 50%; width: 600px; height: 600px; -moz-transform: translate(-50%,-50%) translateZ(0); -webkit-transform: translate(-50%,-50%) translateZ(0); -ms-transform: translate(-50%,-50%) translateZ(0); transform: translate(-50%,-50%) translateZ(0); } .starfield__stars { position: absolute; left: 0; top: 0; height: 100%; width: 100%; } .starfield.small .starfield__stars { width: 1px; height: 1px; box-shadow: 489px 468px #FFF, 364px 571px #FFF, 43px 463px #FFF, 209px 205px #FFF, 59px 60px #FFF, 473px 456px #FFF, 208px 391px #FFF, 518px 463px #FFF, 255px 131px #FFF, 582px 331px #FFF, 165px 297px #FFF, 32px 70px #FFF, 585px 302px #FFF, 532px 459px #FFF, 242px 453px #FFF, 85px 389px #FFF, 282px 598px #FFF, 554px 250px #FFF, 347px 299px #FFF, 93px 352px #FFF, 179px 106px #FFF, 119px 572px #FFF, 405px 248px #FFF, 88px 57px #FFF, 228px 135px #FFF, 519px 302px #FFF, 94px 260px #FFF, 57px 111px #FFF, 450px 4px #FFF, 5px 544px #FFF, 321px 589px #FFF, 438px 298px #FFF, 399px 319px #FFF, 278px 551px #FFF, 134px 468px #FFF, 481px 318px #FFF, 253px 14px #FFF, 53px 33px #FFF, 229px 248px #FFF, 393px 386px #FFF, 490px 96px #FFF, 392px 109px #FFF, 180px 49px #FFF, 537px 174px #FFF, 204px 317px #FFF, 27px 408px #FFF, 571px 580px #FFF, 512px 410px #FFF, 288px 280px #FFF, 168px 504px #FFF, 214px 148px #FFF, 283px 43px #FFF, 221px 368px #FFF, 582px 89px #FFF, 445px 334px #FFF, 4px 455px #FFF, 185px 392px #FFF, 198px 260px #FFF, 202px 91px #FFF, 145px 558px #FFF, 90px 110px #FFF, 346px 473px #FFF, 25px 238px #FFF, 159px 457px #FFF, 468px 549px #FFF, 466px 106px #FFF, 298px 222px #FFF, 428px 477px #FFF, 433px 169px #FFF, 344px 582px #FFF, 207px 527px #FFF, 333px 381px #FFF, 51px 383px #FFF, 415px 590px #FFF, 268px 238px #FFF, 337px 93px #FFF, 536px 584px #FFF, 169px 31px #FFF, 343px 37px #FFF, 33px 258px #FFF, 337px 577px #FFF, 115px 408px #FFF, 566px 552px #FFF, 518px 41px #FFF, 480px 254px #FFF, 288px 140px #FFF, 14px 381px #FFF, 482px 185px #FFF, 83px 252px #FFF, 33px 326px #FFF, 175px 87px #FFF, 502px 551px #FFF, 171px 58px #FFF, 33px 133px #FFF, 266px 294px #FFF, 522px 120px #FFF, 119px 559px #FFF, 227px 378px #FFF, 423px 536px #FFF, 260px 230px #FFF; } .starfield.medium .starfield__stars { width: 2px; height: 2px; box-shadow: 83px 561px #FFF, 299px 500px #FFF, 422px 71px #FFF, 191px 473px #FFF, 265px 582px #FFF, 49px 588px #FFF, 574px 142px #FFF, 205px 94px #FFF, 185px 392px #FFF, 25px 148px #FFF, 27px 102px #FFF, 199px 543px #FFF, 37px 51px #FFF, 78px 212px #FFF, 227px 155px #FFF, 218px 25px #FFF, 186px 556px #FFF, 82px 506px #FFF, 477px 568px #FFF, 586px 165px #FFF, 557px 304px #FFF, 311px 210px #FFF, 37px 1px #FFF, 575px 24px #FFF, 262px 150px #FFF, 321px 551px #FFF, 285px 548px #FFF, 115px 141px #FFF, 414px 590px #FFF, 132px 201px #FFF, 7px 291px #FFF, 438px 437px #FFF, 469px 350px #FFF, 127px 394px #FFF, 179px 539px #FFF, 145px 427px #FFF, 168px 576px #FFF, 67px 580px #FFF, 370px 494px #FFF, 243px 176px #FFF; } .starfield.large .starfield__stars { width: 3px; height: 3px; box-shadow: 464px 394px #FFF, 98px 87px #FFF, 271px 211px #FFF, 121px 274px #FFF, 530px 259px #FFF, 226px 448px #FFF, 480px 198px #FFF, 358px 460px #FFF, 161px 479px #FFF, 214px 127px #FFF, 432px 186px #FFF, 525px 166px #FFF, 118px 206px #FFF, 448px 522px #FFF, 150px 207px #FFF; } .starfield__stars { position: absolute; left: 0; top: -600px; height: 100%; width: 100%; } .starfield.small .starfield__stars:nth-child(1) { -moz-animation: stars 20s linear infinite; -webkit-animation: stars 20s linear infinite; animation: stars 20s linear infinite; } .starfield.medium .starfield__stars:nth-child(1) { -moz-animation: stars 30s linear infinite; -webkit-animation: stars 30s linear infinite; animation: stars 30s linear infinite; } .starfield.large .starfield__stars:nth-child(1) { -moz-animation: stars 50s linear infinite; -webkit-animation: stars 50s linear infinite; animation: stars 50s linear infinite; } .starfield.small .starfield__stars:nth-child(2) { -moz-animation: stars 20s linear infinite 10s; -webkit-animation: stars 20s linear infinite 10s; animation: stars 20s linear infinite 10s; } .starfield.medium .starfield__stars:nth-child(2) { -moz-animation: stars 30s linear infinite 15s; -webkit-animation: stars 30s linear infinite 15s; animation: stars 30s linear infinite 15s; } .starfield.large .starfield__stars:nth-child(2) { -moz-animation: stars 50s linear infinite 25s; -webkit-animation: stars 50s linear infinite 25s; animation: stars 50s linear infinite 25s; } .starship { position: absolute; top: 50%; left: 50%; height: 75px; width: 75px; -moz-transform: translate(-50%, -50%) translateZ(0); -webkit-transform: translate(-50%, -50%) translateZ(0); -ms-transform: translate(-50%, -50%) translateZ(0); transform: translate(-50%, -50%) translateZ(0); } .shipcontrol { width: 50px; height: 50px; border: 2px solid #468CDC; position: absolute; border-radius: 20px; -o-transition: border-color 1s linear; -moz-transition: border-color 1s linear; -webkit-transition: border-color 1s linear; transition: border-color 1s linear; box-shadow: 0 0 15px rgba(0, 255, 204, 0.15), 0 0 15px rgba(0, 255, 204, 0.15) inset; } .shipcontrol.forward { top: 0; left: 50%; -moz-transform: translate(-50%, 10px); -webkit-transform: translate(-50%, 10px); -ms-transform: translate(-50%, 10px); transform: translate(-50%, 10px); } .shipcontrol.right { top: 50%; right: 0; -moz-transform: translate(-10px, -50%); -webkit-transform: translate(-10px, -50%); -ms-transform: translate(-10px, -50%); transform: translate(-10px, -50%); } .shipcontrol.backward { bottom: 0; left: 50%; -moz-transform: translate(-50%, -10px); -webkit-transform: translate(-50%, -10px); -ms-transform: translate(-50%, -10px); transform: translate(-50%, -10px); } .shipcontrol.left { top: 50%; left: 0; -moz-transform: translate(10px, -50%); -webkit-transform: translate(10px, -50%); -ms-transform: translate(10px, -50%); transform: translate(10px, -50%); } #forward:checked ~ #wrap .shipcontrol.forward, #right:checked ~ #wrap .shipcontrol.right, #backward:checked ~ #wrap .shipcontrol.backward, #left:checked ~ #wrap .shipcontrol.left, .shipcontrol:hover { border-color: #FFF; } .shipcontrol .arrow { position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-style: solid; border-width: 0 7.5px 12.5px 7.5px; border-color: transparent transparent #468CDC transparent; -o-transition: border-color 1s linear; -moz-transition: border-color 1s linear; -webkit-transition: border-color 1s linear; transition: border-color 1s linear; } .shipcontrol.forward .arrow { -moz-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .shipcontrol.right .arrow { -moz-transform: translate(-50%, -50%) rotate(90deg); -webkit-transform: translate(-50%, -50%) rotate(90deg); -ms-transform: translate(-50%, -50%) rotate(90deg); transform: translate(-50%, -50%) rotate(90deg); } .shipcontrol.backward .arrow { -moz-transform: translate(-50%, -50%) rotate(180deg); -webkit-transform: translate(-50%, -50%) rotate(180deg); -ms-transform: translate(-50%, -50%) rotate(180deg); transform: translate(-50%, -50%) rotate(180deg); } .shipcontrol.left .arrow { -moz-transform: translate(-50%, -50%) rotate(-90deg); -webkit-transform: translate(-50%, -50%) rotate(-90deg); -ms-transform: translate(-50%, -50%) rotate(-90deg); transform: translate(-50%, -50%) rotate(-90deg); } #forward:checked ~ #wrap .shipcontrol.forward .arrow, #right:checked ~ #wrap .shipcontrol.right .arrow, #backward:checked ~ #wrap .shipcontrol.backward .arrow, #left:checked ~ #wrap .shipcontrol.left .arrow, .shipcontrol:hover .arrow { border-color: transparent transparent #FFF transparent; } #forward:checked ~ #wrap .starfield, #forward:checked ~ #wrap .starship { -moz-transform: translate(-50%, -50%) rotate(0deg) translateZ(0); -webkit-transform: translate(-50%, -50%) rotate(0deg) translateZ(0); -ms-transform: translate(-50%, -50%) rotate(0deg) translateZ(0); transform: translate(-50%, -50%) rotate(0deg) translateZ(0); } #right:checked ~ #wrap .starfield, #right:checked ~ #wrap .starship { -moz-transform: translate(-50%, -50%) rotate(90deg) translateZ(0); -webkit-transform: translate(-50%, -50%) rotate(90deg) translateZ(0); -ms-transform: translate(-50%, -50%) rotate(90deg) translateZ(0); transform: translate(-50%, -50%) rotate(90deg) translateZ(0); } #backward:checked ~ #wrap .starfield, #backward:checked ~ #wrap .starship { -moz-transform: translate(-50%, -50%) rotate(180deg) translateZ(0); -webkit-transform: translate(-50%, -50%) rotate(180deg) translateZ(0); -ms-transform: translate(-50%, -50%) rotate(180deg) translateZ(0); transform: translate(-50%, -50%) rotate(180deg) translateZ(0); } #left:checked ~ #wrap .starfield, #left:checked ~ #wrap .starship { -moz-transform: translate(-50%, -50%) rotate(-90deg) translateZ(0); -webkit-transform: translate(-50%, -50%) rotate(-90deg) translateZ(0); -ms-transform: translate(-50%, -50%) rotate(-90deg) translateZ(0); transform: translate(-50%, -50%) rotate(-90deg) translateZ(0); } #forward:checked ~ #wrap .starfield, #forward:checked ~ #wrap .starship, #right:checked ~ #wrap .starfield, #right:checked ~ #wrap .starship, #backward:checked ~ #wrap .starfield, #backward:checked ~ #wrap .starship, #left:checked ~ #wrap .starfield, #left:checked ~ #wrap .starship { -o-transition: transform 6s cubic-bezier(.25,.8,.25,1); -moz-transition: transform 6s cubic-bezier(.25,.8,.25,1); -webkit-transition: transform 6s cubic-bezier(.25,.8,.25,1); transition: transform 6s cubic-bezier(.25,.8,.25,1); } @keyframes stars { 0% { -moz-transform: translateY(0) translateZ(0); -webkit-transform: translateY(0) translateZ(0); -ms-transform: translateY(0) translateZ(0); transform: translateY(0) translateZ(0); } 100% { -moz-transform: translateY(1200px) translateZ(0); -webkit-transform: translateY(1200px) translateZ(0); -ms-transform: translateY(1200px) translateZ(0); transform: translateY(1200px) translateZ(0); } } @media only screen and (max-width: 399px) { #wrap { width: 98%; } } @media only screen and (max-height: 399px) { #wrap { height: 98%; } }
95
Controlling SpaceShip Using CSS
By:
pixeldev
Previous
1
2
3
4
5
…
24
Next