Open this example in the interactive library
Source code
<style>
.demo {
width: fit-content;
transition: scale 0.2s;
}
.demo:hover {
scale: 1.08;
}
</style>
<div class="demo">Scale a shape on hover</div>
Scale a shape on hover with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
width: fit-content;
transition: scale 0.2s;
}
.demo:hover {
scale: 1.08;
}
</style>
<div class="demo">Scale a shape on hover</div>