Factor out computing the transform box rect into its own method. Then use it when resolving the transformation matrix, to compute percentage values.
13 lines
220 B
HTML
13 lines
220 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.a {
|
|
border: 20px solid crimson;
|
|
transform: translateY(0px);
|
|
}
|
|
.b {
|
|
border: 20px solid crimson;
|
|
transform: translateY(40px);
|
|
}
|
|
</style>
|
|
<div class="a"></div>
|
|
<div class="b"></div>
|