The matrix function for CSS specifies a 2D transformation in the form of a transformation matrix of the six values a, b, c, d, e, f.
<matrix()> =
matrix(
<number>#{6}
) <number> An integer or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits. The first character may be preceded by a sign (- or +). The last character may be succeeded by an exponent (e or E) and an integer.
<!doctype html>
<html>
<head>
<style>
div
{
background-image: url("/assets/svg/Happy.svg");
height: 100px;
width: 100px;
}
</style>
</head>
<body>
<button>initial</button>
<button value="matrix(1, 0, 0, 1, 200, 100)">number</button>
<div>matrix</div>
<script>
function myfunction(myparameter)
{
const mytarget = myparameter.target;
const myproperty = mytarget.value || mytarget.innerHTML;
document.querySelector("div").style.transform = myproperty;
}
for(const mybutton of document.querySelectorAll("button"))
{
mybutton.addEventListener("mouseover", myfunction);
}
</script>
</body>
</html>