Google Chrome Icon using Pure CSS in one DIV

Developer
Size
3,627 Kb
Views
105,248

How do I make an google chrome icon using pure css in one div?

This is the icon of the much favorite Browser, Google Chrome created in Pure CSS and usign only single DOM element. Everything else in the html is just demo specific.. What is a google chrome icon using pure css in one div? How do you make a google chrome icon using pure css in one div? This script and codes were developed by Girish Sharma on 02 August 2022, Tuesday.

Google Chrome Icon using Pure CSS in one DIV Previews

Google Chrome Icon using Pure CSS in one DIV - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Google Chrome Icon using Pure CSS in one DIV</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ /* Demo specific styles begin */
* { margin :0; padding:0;
}
.chrome-icon { position: absolute; top: calc(50% - 100px); left: calc(50% - 370px); z-index: 4;
}
p:hover + .chrome-icon { pointer-events: none; transition: transform 1.5s ease-in; transform: rotate(2880deg); animation: rotate 50ms linear 1s infinite, slide-right 10s ease-out 1.45s 1;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}
p { position: absolute; top: calc(50% - 18px); left: calc(50% - 350px); padding-left: 200px; font: 400 160px/18px 'Open Sans',arial,sans-serif; color: #77787b; text-shadow: 0 0 4px #888; background-clip: content-box;
}
p:after { content: ''; z-index: 2; position: absolute; top: -150%; left: 0; width: 100%; height: 300%; background-image: linear-gradient(to right, white, white 100%); background-repeat: no-repeat; background-size: 0 100%;
}
p:hover:after { transition: background-size 1s ease-out 1.5s; background-size: 100% 100%;
}
@keyframes slide-right { 10% { left: calc(50% + 180px); } to { left: calc(50% + 180px); }
}
a { font-family: arial,sans-serif; font-weight: 600; font-size: 0.9rem; text-decoration: none; position: fixed; bottom: 0; right: 0; margin: 5px; color: #333;
}
a:hover { color: #777;
}
/* Demo specific styles end */
.chrome-icon { width :200px; height:200px; border-radius:50%; box-shadow: inset 0 -20px 25px 0 rgba(0,0,0,.2), 0 2px 4px 1px rgba(0,0,0,0.4), inset 0 40px 40px -15px rgba(255,255,255,.4); overflow:hidden; background-repeat: no-repeat; background-image: linear-gradient(-20deg, transparent 50%, #f5c90e 50%, #e4b11b), linear-gradient(120deg, transparent 50%, #fcd209 50%), linear-gradient(101deg, transparent 50%, #49b147 50%, #3f9c43), linear-gradient(180deg, #e12c2d 28%, #fcd209 28%), linear-gradient(60deg, #4cb648 35%, transparent 35%), linear-gradient(42deg, #c3181c, #df2227 50%, transparent 50%), linear-gradient(60deg, #e12c2d, #e12c2d 100%), linear-gradient(60deg, #4db849, #4db849 100%); background-size: 50% 17%, 21% 35%, 31% 48%, 49.5% 100%, 50.5% 57%, 30% 44%, 50.5% 55%, 50.5% 45%; background-position: 100% 33.5%, 58% 100%, 50% 100%, 100% 0%, 0 0, 10% 20%, 0 0, 0 100%;
}
.chrome-icon:after, .chrome-icon:before { content: ''; height: 45%; width: 45%; left: 27.5%; top: 27.5%; border-radius: 50%; background: white; box-shadow: 0 -5px 50px 0 rgba(0,0,0,0.2); position: absolute;
}
.chrome-icon:before { z-index: 2; top: 31%; left: 31%; height: 38%; width: 38%; background: #4788c7; box-shadow: inset 0 -20px 30px 0 rgba(0,0,0,0.2);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <p>chrome</p><div class="chrome-icon"></div>
<a href="http://codepen.io/collection/khwrE">See my other interesting loaders in pure CSS</a>
</body>
</html>

Google Chrome Icon using Pure CSS in one DIV - Script Codes CSS Codes

/* Demo specific styles begin */
* { margin :0; padding:0;
}
.chrome-icon { position: absolute; top: calc(50% - 100px); left: calc(50% - 370px); z-index: 4;
}
p:hover + .chrome-icon { pointer-events: none; transition: transform 1.5s ease-in; transform: rotate(2880deg); animation: rotate 50ms linear 1s infinite, slide-right 10s ease-out 1.45s 1;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}
p { position: absolute; top: calc(50% - 18px); left: calc(50% - 350px); padding-left: 200px; font: 400 160px/18px 'Open Sans',arial,sans-serif; color: #77787b; text-shadow: 0 0 4px #888; background-clip: content-box;
}
p:after { content: ''; z-index: 2; position: absolute; top: -150%; left: 0; width: 100%; height: 300%; background-image: linear-gradient(to right, white, white 100%); background-repeat: no-repeat; background-size: 0 100%;
}
p:hover:after { transition: background-size 1s ease-out 1.5s; background-size: 100% 100%;
}
@keyframes slide-right { 10% { left: calc(50% + 180px); } to { left: calc(50% + 180px); }
}
a { font-family: arial,sans-serif; font-weight: 600; font-size: 0.9rem; text-decoration: none; position: fixed; bottom: 0; right: 0; margin: 5px; color: #333;
}
a:hover { color: #777;
}
/* Demo specific styles end */
.chrome-icon { width :200px; height:200px; border-radius:50%; box-shadow: inset 0 -20px 25px 0 rgba(0,0,0,.2), 0 2px 4px 1px rgba(0,0,0,0.4), inset 0 40px 40px -15px rgba(255,255,255,.4); overflow:hidden; background-repeat: no-repeat; background-image: linear-gradient(-20deg, transparent 50%, #f5c90e 50%, #e4b11b), linear-gradient(120deg, transparent 50%, #fcd209 50%), linear-gradient(101deg, transparent 50%, #49b147 50%, #3f9c43), linear-gradient(180deg, #e12c2d 28%, #fcd209 28%), linear-gradient(60deg, #4cb648 35%, transparent 35%), linear-gradient(42deg, #c3181c, #df2227 50%, transparent 50%), linear-gradient(60deg, #e12c2d, #e12c2d 100%), linear-gradient(60deg, #4db849, #4db849 100%); background-size: 50% 17%, 21% 35%, 31% 48%, 49.5% 100%, 50.5% 57%, 30% 44%, 50.5% 55%, 50.5% 45%; background-position: 100% 33.5%, 58% 100%, 50% 100%, 100% 0%, 0 0, 10% 20%, 0 0, 0 100%;
}
.chrome-icon:after, .chrome-icon:before { content: ''; height: 45%; width: 45%; left: 27.5%; top: 27.5%; border-radius: 50%; background: white; box-shadow: 0 -5px 50px 0 rgba(0,0,0,0.2); position: absolute;
}
.chrome-icon:before { z-index: 2; top: 31%; left: 31%; height: 38%; width: 38%; background: #4788c7; box-shadow: inset 0 -20px 30px 0 rgba(0,0,0,0.2);
}
Google Chrome Icon using Pure CSS in one DIV - Script Codes
Google Chrome Icon using Pure CSS in one DIV - Script Codes
Home Page Home
Developer Girish Sharma
Username grssam
Uploaded August 02, 2022
Rating 3
Size 3,627 Kb
Views 105,248
Do you need developer help for Google Chrome Icon using Pure CSS in one DIV?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Girish Sharma (grssam) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!