How to calculate the transform-origin? of proportional scaling

clipboard.png

<div class="red">
    <div class="black">
        <div class="blue"></div>
    </div>
</div>

Red is the parent container, blue is the child element in black, and the position remains the same.

ask for:

when the black is enlarged, the blue width is filled with red and the top is aligned, the black scaling base point coordinates x code y .

that is, transform:scale (a certain multiple) transform-origin attribute value

Mar.28,2021

if the top is aligned, it is the crossing point of the line (green line) of the top two points

  • Some problems of css attribute drag dragging

    1, there is a need to drag the icon, put it in one place, and generate a shortcut. I used the drag attribute in CSS to drag 2. The problem is: drag with the background color before dragging. I don t want this background color. here s what happens w...

    Jun.23,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf40ab-31ecb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf40ab-31ecb.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?