I just learned some HTML content yesterday, and I couldn’t wait to make a search bar on JD.com. I finally made it, but when I was doing the shopping cart checkout, there was a number displayed on it and I didn’t know how to add it. , if you want the numbers to move with the shopping cart, you must position them together. Positioning definitely requires position. First, set the position of the div of the numbers to absolute, which gives it a layered feel, because at this time The parent tag of the digital position is body, so when setting top and left, you can also set it to the desired position of the shopping cart. However, if you change the margin of the shopping cart, the two cannot move together, so you set the position of the shopping cart. Become relative, so that the parent tag of the position of the number becomes the shopping cart. No matter how the margin of the shopping cart is adjusted, the numbers will move with it....