ScanSkill
CSS Examples

How to Make an Element Bigger on Hover using CSS

In this example, we will learn how to make an element bigger on hover using CSS. We will be using the transform property of CSS to transform the element.

Prerequisites

Example

.example{
            padding: 10px;
            background-color: aquamarine;
            cursor: pointer;
        }

        .example:hover{
            transform: scale(1.5);
        }

Output

Conclusion

In this example, we learned how to make an element bigger on hover using CSS. Here, we used the transform property with its value set to scale(1.5) to grow the element 1.5 times when the mouse hovers over the element.