Skip to content

Instantly share code, notes, and snippets.

@PeterWaIIace
Created November 26, 2023 19:32
Show Gist options
  • Save PeterWaIIace/e4b3435530ee49ce769d3f85359ee331 to your computer and use it in GitHub Desktop.
Save PeterWaIIace/e4b3435530ee49ce769d3f85359ee331 to your computer and use it in GitHub Desktop.
eye.css
<!DOCTYPE html>
<html>
<head>
<style>
.eyeball {
width: 80px;
height: 80px;
background-color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: relative; /* For positioning the light reflex */
border: 1px solid black; /* Optional, for defining the eyeball's boundary */
}
.ring {
width: 75px;
height: 75px;
background-color: #FFAA00; /* Light yellow for the outer ring */
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.iris {
width: 50px;
height: 50px;
background-color: yellow;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.pupil {
width: 25px;
height: 25px;
background-color: black;
border-radius: 50%;
}
.light-reflex {
width: 20px;
height: 20px;
background-color: white;
border-radius: 50%;
position: absolute;
top: 20px;
left: 20px;
}
</style>
</head>
<body>
<div class="eyeball">
<div class="light-reflex"></div> <!-- Light reflex -->
<div class="ring"> <!-- Outer Ring -->
<div class="iris">
<div class="pupil"></div>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment