An Interest In:
Web News this Week
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
September 20, 2020 03:36 am GMT
Original Link: https://dev.to/rs9110/google-logo-with-just-html-css-3bmi
google logo with just html & css
So, here's how to create the Google logo with just HTML and CSS.
First, place a div
in your html with an id
of google
.
<div id="google"></div>
Then, hop into css and input the following code.
#google { position: relative; border-top: 100px solid #EA4335; border-right: 100px solid #4285F4; border-bottom: 100px solid #34A853; border-left: 100px solid #FBBC05; border-radius: 50%; background-color: #FFFFFF; width: 300px; height: 300px; padding: 0; margin 10vh auto 0;}
That should leave you with a circle that has 4 of the Google's color. To turn that into a 'G', input the code below.
#google::before { content: ""; z-index: 100; position: absolute; top: 50%; right: -95px; transform: translateY(-50%); width: 245px; height: 100px; background: #4285F4;}#google::after { content: ""; z-index: 101; position: absolute; border-top: 200px solid transparent; border-right: 200px solid #FFFFFF; top: -100px; right: -100px; width: 0; height: 0;}
Voila, you just created the Google logo using only HTML and CSS.
Original Link: https://dev.to/rs9110/google-logo-with-just-html-css-3bmi
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To