Start Coding
All
Accordion
Buttons
Cards
Carousel
Css Animation
Hexagons
Hover
Layout
Loaders
Menu
Navigation
Slider
Tables
Wave
Hover
:hover, please
Now here
Around and inside I
Around and inside II
:hover with animation
*, *:after, *:before { box-sizing: border-box; -moz-box-sizing: border-box; } * {margin:0;padding:0;border:0 none;position: relative; outline: none; } html, body { background: #004050; font-family: Quando; font-weight: 300; width: 100%; } h2, h3 { background: #0D757D; width: 100%; min-height: 200px; line-height: 200px; font-size: 3rem; font-weight: normal; text-align: center; color: rgba(0,0,0,.4); margin: 3rem auto 0; } .uno {background: #ff5e33;} .dos.bis {background: #85144B;} .dos {background: #FADD40;} h3 {background: #2B5B89;} h2 > a, h3 > a { text-decoration: none; color: rgba(0,0,0,.4); z-index: 1; } h2 > a:before { content: ""; position: absolute; width: 100%; height: 3px; bottom: 0; left: 0; background: #9CF5A6; visibility: hidden; border-radius: 5px; transform: scaleX(0); transition: .25s linear; } h2 > a:hover:before, h2 > a:focus:before { visibility: visible; transform: scaleX(1); } .uno a:before { background: rgba(0,0,0,0); box-shadow: 0 0 10px 2px #ffdb00; } .dos > a:after { content: ""; position: absolute; width: 100%; height: 7px; border: 1px solid #000; bottom: -2px; left: 0; background: #fff; border-radius: 5px; opacity: 0; transform: scalex(0); transition: .5s; } .dos.bis > a:after { opacity: .05; transform: scalex(1); } .dos:hover > a:after { opacity: .15; transform: scalex(1); } .dos.bis > a:before { background: rgba(0,0,0,0); box-shadow: 0 0 10px 2px #FADD40; } .dos > a:before { background: rgba(0,0,0,0); box-shadow: 0 0 10px 2px #FF5E33; } h3 > a:before { content: ""; background: #7FDBFF; position: absolute; width: 100%; height: 5px; bottom: 0; left: 0; border-radius: 5px; transform: scaleX(0); animation: 1.4s forwards no-hover-v linear; animation-fill-mode: forwards; z-index: -1; } h3 > a:hover:before, h3 > a:focus:before { animation: .5s forwards hover-v linear; animation-fill-mode: forwards; } @keyframes hover-v { 0% { transform: scaleX(0); height: 5px; } 45% { transform: scaleX(1.05); height: 5px; } 55% {height: 5px;} 100% { transform: scaleX(1.05); height: 3.8rem; } } @keyframes no-hover-v { 0% { transform: scaleX(1.05); height: 3.8rem; } 45% {height: 5px;} 55% { transform: scaleX(1.05); height: 5px; opacity: 1; } 100% { transform: scaleX(0); height: 5px; opacity: .02; } } p {padding: .5rem;} p a {color: rgba(255,255,255,.5)}
44
text-decoration: underline animated
By:
pixeldev
Cool Css Button Border Animation On Hover
Cool Css Button Border Animation On Hover - CSS3 Hover Effects - Pure CSS
Button
/* common css */ body { margin: 0; padding: 0; background: #262626; } h2 {color: #fff; text-align: center;} /* button hover amazing effect */ a { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-transform: uppercase; text-decoration: none; text-align: center; /* line-height: 2; */ color: #ff0; font-size: 30px; font-family: verdana; letter-spacing: 4px; /* use combination of any two */ /* 1. */ /* padding: 5px; */ /* 2. */ padding-left: 5px; /* padding-right: 5px; */ } a::before, a::after, span::before, span::after { content: ''; position: absolute; width: 8px; height: 8px; background: transparent; transition: 1s; /* -webkit-mix-blend-mode: hue; */ } a::before { top: -2px; left: -2px; border-top: 2px solid #ff0; border-left: 2px solid #ff0; } a::after { top: -2px; right: -2px; border-top: 2px solid #ff0; border-right: 2px solid #ff0; } span::before { bottom: -2px; left: -2px; border-bottom: 2px solid #ff0; border-left: 2px solid #ff0; } span::after { bottom: -2px; right: -2px; border-bottom: 2px solid #ff0; border-right: 2px solid #ff0; } a:hover::before, a:hover::after, a:hover span::before, a:hover span::after { width: calc( 180px / 2); height: calc( 50px / 2); }
17
Cool Css Button Border Animation On Hover – CSS3 Hover Effects – Pure CSS
By:
pixeldev
Button
body { margin: 0; padding: 0; /* background: #262626;*/ font-family: verdana; box-sizing: border-box; } a { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-decoration: none; text-transform: uppercase; background: #262626; width: 150px; height: 60px; line-height: 60px; color: #FFF; padding: 0px 10px; letter-spacing: 5px; text-align: center; font-size: 20px; transition: 0.5; overflow: hidden; } a:before { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 0; /* background: #F00;*/ z-index: -1; transition: 1s; border-style: solid; border-color: #F00; border-width: 80px 100px; transform: rotate(360deg); transform-origin: top left } a:hover:before { border-color: #00F; transform: rotate(40deg) } a:hover { color: #ff0; transition: 0.5s; transition-delay: 0.3s; }
16
Button Hover Effect
By:
pixeldev
CSS Button Hover Effect
I'm a button
I'm a button
I'm a button
I'm a button
I'm a button
.container { margin: 0 auto; width: 100%; text-align: center; font-size: 0; font-family: Arial, Helvetica, sans-serif; font-weight: 400; background: #ffffff; } h2.title { position: relative; margin-bottom: 15px; padding-bottom: 15px; font-size: 30px; color: #222222; } h2.title::after { position: absolute; content: ""; width: 50px; height: 3px; left: calc(50% - 25px); bottom: 0; background: #222222; } p { position: relative; margin: 15px auto; font-size: 16px; color: #222222; } .btn { position: relative; display: inline-block; margin: 15px; padding: 12px 27px; text-align: center; font-size: 16px; letter-spacing: 1px; text-decoration: none; color: #999999; background: #ffffff; border: 3px solid #999999; cursor: pointer; transition: ease-out 0.5s; -webkit-transition: ease-out 0.5s; -moz-transition: ease-out 0.5s; } .btn.btn-border-1::after, .btn.btn-border-1::before { position: absolute; content: ""; width: 0%; height: 0%; visibility: hidden; } .btn.btn-border-1::after { bottom: -3px; right: -3px; border-left: 3px solid #222222; border-bottom: 3px solid #222222; transition: width .1s ease .1s, height .1s ease, visibility 0s .2s; } .btn.btn-border-1::before { top: -3px; left: -3px; border-top: 3px solid #222222; border-right: 3px solid #222222; transition: width .1s ease .3s, height .1s ease .2s, visibility 0s .4s; } .btn.btn-border-1:hover { animation: pulse 1s ease-out .4s; color: #222222; } .btn.btn-border-1:hover::after, .btn.btn-border-1:hover::before { width: calc(100% + 3px); height: calc(100% + 3px); visibility: visible; transition: width .1s ease .2s, height .1s ease .3s, visibility 0s .2s; } .btn.btn-border-1:hover::after { transition: width .1s ease .2s, height .1s ease .3s, visibility 0s .2s; } .btn.btn-border-1:hover::before { transition: width .1s ease, height .1s ease .1s; } .btn.btn-border-2::after, .btn.btn-border-2::before { position: absolute; content: ""; width: 0; height: 0; transition: .5s; } .btn.btn-border-2::after { top: -3px; left: -3px; border-top: 3px solid transparent; border-left: 3px solid transparent; } .btn.btn-border-2::before { bottom: -3px; right: -3px; border-bottom: 3px solid transparent; border-right: 3px solid transparent; } .btn.btn-border-2:hover { color: #222222; } .btn.btn-border-2:hover::after, .btn.btn-border-2:hover::before { width: calc(50% + 3px); height: calc(50% + 3px); border-color: #222222; } .btn.btn-border-3::after, .btn.btn-border-3::before { position: absolute; content: ""; width: 0; height: 0; transition: .5s; } .btn.btn-border-3::after { top: -9px; left: -9px; border-top: 3px solid transparent; border-left: 3px solid transparent; } .btn.btn-border-3::before { bottom: -9px; right: -9px; border-bottom: 3px solid transparent; border-right: 3px solid transparent; } .btn.btn-border-3:hover { color: #222222; } .btn.btn-border-3:hover::after, .btn.btn-border-3:hover::before { width: 30px; height: 30px; border-color: #222222; } .btn.btn-border-4::after, .btn.btn-border-4::before { position: absolute; content: ""; width: 0; height: 0; transition: .5s; } .btn.btn-border-4::after { top: -9px; left: -9px; border-top: 3px solid transparent; border-left: 3px solid transparent; } .btn.btn-border-4::before { bottom: -9px; right: -9px; border-bottom: 3px solid transparent; border-right: 3px solid transparent; } .btn.btn-border-4:hover { color: #222222; } .btn.btn-border-4:hover::after, .btn.btn-border-4:hover::before { width: calc(100% + 15px); height: calc(100% + 15px); border-color: #222222; } .btn.btn-border-5::after, .btn.btn-border-5::before { position: absolute; content: ""; width: 0; height: 0; transition: .5s; } .btn.btn-border-5::after { top: 0; left: 0; border-top: 3px solid transparent; } .btn.btn-border-5::before { bottom: 0; right: 0; border-bottom: 3px solid transparent; } .btn.btn-border-5:hover { color: #222222; } .btn.btn-border-5:hover::after, .btn.btn-border-5:hover::before { width: 100%; height: 100%; border-color: #222222; }
15
CSS Buttons Hover 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 ****/
15
Header navigation menu with dropdown on hover (pure CSS)
By:
pixeldev
BUTTON ONE
IDLE
BUTTON THREE
BUTTON FOUR
BUTTON FIVE
BUTTON SIX
@import 'https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300'; /* FORMATTING FOR CODEPEN */ html,body { height: 100%; width: 100%; margin: 0; display: flex; flex-direction: column; flex-wrap: wrap; font-family: 'Open Sans Condensed', sans-serif; } .col { height: 100%; } div[class*=container] { text-align: center; width: 100%; height: 33%; display: flex; justify-content: center; align-items: center; } .container-1 { background: #333; } .container-2 { background: #4E598C; } .container-3 { background: #8499B1; } .container-4 { background: #9888A5; } .container-5 { background: #7B6D8D; } .container-6 { background: #565554; } /* BUTTON STYLING */ .btn { position: relative; color: white; width: 256px; height: 64px; line-height: 64px; transition: all 0.3s; span { transition: all 0.3s; tranform: scale(1, 1); } } .btn::before, .btn::after { content: ''; position: absolute; transition: all 0.3s; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .btn-one::before { left: 4px; z-index: 1; opacity: 0; background: rgba(255, 255, 255, 0.1); transform: scale(0.1, 1); } .btn-one:hover::before { opacity: 1; transform: scale(1, 1); } .btn-one::after { transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.5); } .btn-one:hover::after { transform: scale(1, .1); opacity: 0; } /* BTN TWO */ .btn-two::before, .btn-two::after { content: ''; position: absolute; width: 100%; height: 100%; bottom: 0; left: 0; z-index: 1; transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.5); } .btn-two:hover::after { animation-name: rotatecw; animation-duration: 2s; } .btn-two:hover::before { animation-name: rotateccw; animation-duration: 3s; } .btn-two:hover::after, .btn-two:hover::before { left: 96px; width: 64px; animation-iteration-count: infinite; animation-timing-function: linear; } @keyframes rotatecw { from {transform: rotate(0deg);} to {transform: rotate(360deg);} } @keyframes rotateccw { from {transform: rotate(0deg);} to {transform: rotate(-360deg);} } /* BTN THREE */ .btn-three::before { opacity: 0; background: rgba(255, 255, 255, 0.1); transform: scale(1, 0.1); } .btn-three:hover::before { opacity: 1; transform: scale(1, 1); } .btn-three::after { transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.5); } .btn-three:hover::after { transform: scale(1, .1); opacity: 0; } /* BTN FOUR */ .btn-four:hover span { transform: scale(1.2, 1.2); } .btn-four::before { opacity: 0; background: rgba(255, 255, 255, 0.1); transform: scale(0.1, 0.1); } .btn-four:hover::before { opacity: 1; transform: scale(1, 1); } .btn-four::after { transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.5); } .btn-four:hover::after { transform: scale(0, 0); opacity: 0; } /* BTN FIVE */ .btn-five::before { transition: transform 0.15s, 0.15s border-radius 0.15s; opacity: 0; background: rgba(255, 255, 255, 0.1); transform: scale(0.1, 0.1); border-radius: 50%; } .btn-five:hover::before { opacity: 1; transform: scale(1, 1); border-radius: 0; } .btn-five::after { transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.3); } .btn-five:hover::after { opacity: 0; } /* BTN SIX */ .btn-six::before { opacity: 0; background: rgba(255, 255, 255, 0.1); transform: scale(1.3, 1.3); } .btn-six:hover::before { opacity: 1; transform: scale(1, 1); } .btn-six::after { transition: all 0.3s; border: 1px solid rgba(255, 255, 255, 0.5); } .btn-six:hover::after { transform: scale(0, 0); opacity: 0; }
14
Six Pure CSS Button Hover Animations
By:
pixeldev
body { padding:15px; } #heart { display:block; height:70px; width:70px; position:relative; } #heart .fill { display: block; height: 70px; left: -1px; overflow: hidden; position: absolute; top: -4px; width: 70px; z-index: 3; -webkit-transition: height 2s ease-in-out; -moz-transition: height 2s ease-in-out; -o-transition: height 2s ease-in-out; -ms-transition: height 2s ease-in-out; transition: height 2s ease-in-out; } #heart .fill:before, #heart .fill:after { background: #e74c3c; border-radius: 85px 60px 0 0; content:""; height: 59px; left: 37px; position: absolute; top: 6px; width: 36px; -moz-border-radius: 50px 50px 0 0; border-radius: 85px 60px 0 0; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 0 100%; -moz-transform-origin: 0 100%; -ms-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100%; } #heart .fill:after { left: 1px; -webkit-transform: rotate(45deg); border-radius: 45px 60px 0 0; -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 100% 100%; -moz-transform-origin: 100% 100%; -ms-transform-origin: 100% 100%; -o-transform-origin: 100% 100%; transform-origin: 100% 100%; } #heart .outline { position: relative; margin-left: 8px; } #heart .outline:before, #heart .outline:after { position: absolute; content:""; left: 28px; top: 1px; width: 39px; height: 62px; background: #d53423; -moz-border-radius: 50px 50px 0 0; border-radius: 85px 60px 0 0; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 0 100%; -moz-transform-origin: 0 100%; -ms-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100%; } #heart .outline:after { left: -11px; -webkit-transform: rotate(45deg); border-radius: 45px 60px 0 0; -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 100% 100%; -moz-transform-origin: 100% 100%; -ms-transform-origin: 100% 100%; -o-transform-origin: 100% 100%; transform-origin: 100% 100%; } #heart:hover .fill { height:0px; }
12
Hover Fill my Heart Up
By:
pixeldev
Pure Css Button Hover effect
Hover me
Made by
alticreation.com
.button { display: inline-block; padding: 0.75rem 1.25rem; border-radius: 10rem; color: #fff; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.15rem; transition: all 0.3s; position: relative; overflow: hidden; z-index: 1; } .button:after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; background-color: #0cf; border-radius: 10rem; z-index: -2; } .button:before { content: ''; position: absolute; bottom: 0; left: 0; width: 0%; height: 100%; background-color: #0099cc; /* manually darkened #0cf */ transition: all 0.3s; border-radius: 10rem; z-index: -1; } .button:hover { color: #fff; } .button:hover:before { width: 100%; } /* Optional reset for presentation */ * { font-family: Arial; text-decoration: none; font-size: 20px; } .container { padding-top: 50px; margin: 0 auto; width: 100%; text-align: center; } h1 { text-transform: uppercase; font-size: 0.8rem; margin-bottom: 2rem; color: #777; } span { display: block; margin-top: 2rem; font-size: 0.7rem; color: #777; } span a { font-size: 0.7rem; color: #999; text-decoration: underline; }
12
Pure Css Button Hover effect
By:
pixeldev
Hover the buttons
Home
About
Gallery
Contact
Home
About
Gallery
Contact
Home
About
Gallery
Contact
@import url(https://fonts.googleapis.com/css?family=Open+Sans); html, body { background-color: rgb(23,25,31); font-family: "open sans"; color: rgba(255,255,255,0.5); text-align: center; } ul { list-style: none; padding-top: 50px; } h1 { font-weight: 100; color: white; } .cont { width: 700px; height: 100%; margin-left: auto; margin-right: auto; } #button { cursor: pointer; width: 150px; height: 40px; line-height: 40px; background-color: transparent; border: 1px solid rgba(255,255,255,0.5); float: left; transition: all 0.5s; } #button:hover { box-shadow: 0 0 12px rgba(70,150,240,0.7) inset; border: 1px solid rgba(255,255,255,1); color: rgba(255,255,255,1); } #button2 { cursor: pointer; width: 150px; height: 40px; line-height: 40px; background-color: transparent; border: 1px solid rgba(255,255,255,0.5); float: left; transition: all 0.5s; } #button2:hover { box-shadow: 0 40px 12px rgba(70,150,240,0.25) inset, 0 -40px 12px rgba(70,150,240,0.25) inset; border: 1px solid rgba(255,255,255,1); color: rgba(255,255,255,1); } #button3 { cursor: pointer; width: 150px; height: 40px; line-height: 40px; background-color: transparent; border: 1px solid rgba(255,255,255,0.5); float: left; transition: all 0.5s; } #button3:hover { box-shadow: 0 0 8px 4px rgba(70,150,240,0.25) inset, 0 0 8px 4px rgba(70,150,240,0.25); border: 1px solid rgba(70,150,240,1); color: rgba(255,255,255,1); }
12
Button hover inner shadow
By:
pixeldev
Made By
Rald Dev
@import url('https://fonts.googleapis.com/css?family=Oswald'); body { margin: 0px; } #circle-container { display: flex; align-items: center; justify-content: center; background-color: lightblue; width: 100vw; height: 100vh; position: relative; } .circle { width: 50vh; height: 50vh; position: absolute; border-radius: 50%; } #one:before { content: "Hover Me!"; } #one { background-color: rgba(0,0,225, 0.45); font-size: 40px; font-family: "Oswald", sans-serif; letter-spacing: 1.5px; display: flex; justify-content: center; align-items: center; color: white; font-weight: bold; transition: 1s; } #two { background-color: green; transition: 1s; opacity: 0.5; } #three { background-color: red; transition: 1s; opacity: 0.5; } #four { background-color: orange; transition: 1s; opacity: 0.5; } #five { background-color: green; transition: 1s; opacity: 0.5; } #cc { position:relative; width: 50vh; height: 50vh; border-radius: 50%; overflow: hidden; } #cc:hover #two { transform: translate(0px, 75px); } #cc:hover #three { transform: translate(0px, -75px); } #cc:hover #four { transform: translate(75px, 0px); } #cc:hover #five { transform: translate(-75px, 0px); } #mb { position: absolute; font-family: "Oswald", sans-serif; letter-spacing: 0.5px; bottom: 0px; display: flex; justify-content: center; width: 100vw; background-color: #3B3A6D; color: white; } #mb a { color: white; text-decoration: none; font-weight: bold; padding: 0px; } #mb p { padding: 5px; margin: 0px; }
10
Pure CSS Circle Hover Affect
By:
pixeldev
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); }
7
Pure CSS – File icons with hover animation
By:
pixeldev
/* Reset */ * { margin: 0; padding: 0; box-sizing: border-box; } body { background-color: #3A3033; } .container { display: flex; justify-content: center; align-items: center; width: 100%; height: 100vh; overflow: hidden; background: #70B7CC; } .container--c-0 { background: #3A3033; } .icon { position: relative; width: 240px; height: 240px; animation: delayIn 1s ease-in 1; } @media screen and (max-width: 400px) { .icon { width: 180px; height: 180px; } } .sun { position: relative; width: 100%; height: 100%; background: #FFF031; border-radius: 50%; animation: raySpin 20s linear infinite; } .sun::before { display: block; content: ''; position: absolute; z-index: -200; width: 100%; height: 100%; background: #FFF031; border-radius: 50%; transform: scale(0.9); animation: blastIn .35s ease-in-out 1; pointer-events: none; } .sun::after { display: block; content: ''; position: absolute; z-index: -100; width: 100%; height: 100%; background: #FFF031; border-radius: 50%; pointer-events: none; } .sun:hover::before { animation: blastOut .5s ease-in-out 1; } .sun:hover::after { animation: bounce .5s ease-in-out 1; } .sun__rays { position: absolute; z-index: -400; width: 140%; height: 140%; top: -20%; left: -20%; transform: scale(0.5); animation: raysIn .5s ease-in-out 1 forwards; pointer-events: none; } .sun:hover .sun__rays { animation: raysOut .5s ease-in-out 1 forwards; } .sun__ray { position: absolute; left: 50%; width: 2%; height: 100%; margin-left: -1%; } .sun__ray:nth-of-type(2) { transform: rotate(20deg); } .sun__ray:nth-of-type(3) { transform: rotate(40deg); } .sun__ray:nth-of-type(4) { transform: rotate(60deg); } .sun__ray:nth-of-type(5) { transform: rotate(80deg); } .sun__ray:nth-of-type(6) { transform: rotate(80deg); } .sun__ray:nth-of-type(7) { transform: rotate(100deg); } .sun__ray:nth-of-type(8) { transform: rotate(120deg); } .sun__ray:nth-of-type(9) { transform: rotate(140deg); } .sun__ray:nth-of-type(10) { transform: rotate(160deg); } .sun__ray::before, .sun__ray::after { display: block; content: ''; position: absolute; width: 100%; height: 10%; background: rgba(255, 255, 255, 0.4); } .sun__ray::before { top: 0; } .sun__ray::after { bottom: 0; } /* Animations */ @keyframes blastOut { 0% { transform: scale(0.9); opacity: .6; } 100% { transform: scale(10); opacity: 0; } } @keyframes blastIn { 0% { transform: scale(10); opacity: 0; } 30% { opacity: 0.1; } 100% { transform: scale(0.9); opacity: 0; } } @keyframes bounce { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } @keyframes raysOut { 0% { transform: scale(0.5); } 100% { transform: scale(1); } } @keyframes raysIn { 0% { transform: scale(1); } 100% { transform: scale(0.5); } } @keyframes raySpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(359.999deg); } } @keyframes delayIn { 0% { transform: scale(0); } 50% { transform: scale(0); } 100% { transform: scale(1); } }
6
Pure CSS Animated Weather Icon Hover
By:
pixeldev
1
2
Next