WebDev For You - Daily Interaction #131

site profile thumbnail
Welcome to Daily Interaction #131. With this effect a border appears around the logo and lines appear from all corners of the logo. The effect was achieved by setting the border color to transparent on the initial state and on the hover state changing it to black. I then placed lines with a width of 15px and height of 3px and vice versa in the different corners of the logo. Then in interactions I scaled them from 0 to 1 respectively on the x and y axis for the horizontal and vertical lines. To minimize the number of interactions that needed to be applied to the lines I created a class for the corner horizontal lines and the corner vertical lines. I then added combo classes and placed the lines in the different corners around the logo. This allowed me to only use two interactions for the horizontal and vertical lines. I also changed the transform-origin for the different lines so they scaled in from the correction side. Inspired by: https://codepen.io/Sherpa23/pen/rKvJXg

More sites by WebDev For You

See profile

Similar sites