It is best to use pure html css, pseudo code example:
<p id="1">
<p id="2"></p>
<p id="3">
<ul></ul>
</p>
</p>
Let the width of the outer layer p1 change with the width of the inner layer p
迷茫2017-06-26 11:00:30
Thanks for the invitation.
<style>
#a {
border: 1px solid red;
display: inline-block;
}
#b {
border: 1px solid green;
margin: 2px 2px 2px 2px;
height: 50px;
width: 500px;
}
</style>
<p id="a">
<p id="b"></p>
<p id="c">
<ul></ul>
</p>
</p>