Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html>
<title>Reference for transition on pseudo-element</title>
<style>
div {
width: 100px;
height: 100px;
background: rgb(255, 191, 0);
}
div::before {
content: "";
background: rgb(184, 115, 51);
width: 100px;
height: 100px;
transform: ScaleX(0.5);
display: block;
will-change: transform;
}
</style>
<div></div>