The parent element of span is also span, and the position of the child element is lower than that of the parent element after using the child absolute parent phase. Why?

    <style>
        .a{
            font-size: 100px;
            position: relative;
        }
        .b{
            position: absolute;
            color: red;
            top: 0;
            left: 0;
        }
    </style>
    
    <span class="a"><span class="b"></span></span>
The

code is shown in the figure above. When the span element of .b is used as a child of span of .an and the child absolute parent phase is applied, there will be a problem with the following picture


.bspanline-height:100px


. Later, I added display:block/inline-block to the span style of the parent element to make the two elements completely overlap. Why? Is there any other solution?

Css
Mar.11,2021

just set inline-block for the parent element.
unless it is similar to span nesting a, other elements are generally not nested in inline elements, which contain differences between different browsers and the problem of inheriting parent element styles.

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-1eb0192-22ab.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-1eb0192-22ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?