The link you shared utilizes CSS3 animations/transitions and a canvas. However, it seems to have an excessive amount of code for achieving a simple effect on the logo. This method may not be very efficient, as noted by Josh Burgess, who suggested using a .gif image instead. Despite that, let's delve into some interesting aspects of this logo, beyond just the canvas or gif image.
Let's start with the circles in the design – they are not images but created solely using CSS and HTML for the static portion of the logo. While one could use .gif images to achieve a similar look, here it is all about CSS styling.
Exploring the Circles
CSS:
.myCircles li, .myCircles li:after {
position: absolute;
top: 25px;
left: 25px;
list-style: none; /* hide the list style */
text-indent: -9001em; /* hide the text content */
width: 50px;
height: 50px;
border-radius: 100% 100% 100% 100%;
border-top: 5px solid #000;
border-right: 5px solid #000;
border-bottom: 5px solid #000;
border-left: 5px solid transparent;
transform: rotate(45deg);
transition: all 2s; /* The transition effect */
-moz-transition: all 2s; /* Firefox 4 */
-webkit-transition: all 2s; /* Safari and Chrome */
-o-transition: all 2s; /* Opera */
}
.myCircles li:after {
content: '';
left: 25px;
}
.myCircles li:hover {
transform: rotate(190deg);
opacity: 0.5;
}
HTML:
<ul class="myCircles">
<li id="circle"> circle </li>
</ul>
The website generates multiple circles through the :before and :after selectors, demonstrating the fading-in animation when triggered. By adding a simple :hover action, users can observe the fading effect firsthand.
You can apply these transitions and animations to various events beyond just hover effects by incorporating JavaScript functions like onclick or load events.
HTML/JS (jQuery):
<button id="test">login</button>
<script>
$(document).ready(function(){
$('#test').click(function() {
$('#circle').css( 'left', '100px' );
$('#circle').css( 'opacity', '0.5' );
});
});
</script>
While utilizing canvases offers flexibility in rendering complex animations, it may involve more manual work or relying on libraries to harness its full potential. Nevertheless, the canvas element provides greater creative freedom for intricate animations.
For further references on animations and effects, feel free to explore resources such as CSS Transformations and Canvas Animations:
CSS Transformations, Transitions, Animations:
CSS Transformations
Canvas Animations:
Canvas Animations