I just came into contact with this thing today. After reading many web pages, I can’t explain it clearly. I summarized it through my own experiments. Of course it is not comprehensive, but it feels really strange:
In fact, the following attributes are the most important:
float:left; position:relative; top:0px; left:10%; width:30%;
The poster is obviously studying DIV CSS with some emotion. What you said is weird. Of course, I don’t think that is the case. The calculation method of left is, of course, just counting its own coordinates. Why should it calculate the offset of its parent div? If you really do it like this, it would be really weird.
I think that the DIV CSS method will gradually become mainstream, and table layout will become increasingly rare
The poster is obviously studying DIV CSS with some emotion. Of course you are weird. I don't think that's the case. The calculation method of left is, of course, just counting its own coordinates. Why should it calculate the offset of its parent div? If you really do it like this, it would be really weird.
I think that the DIV CSS method will gradually become mainstream, and table layout will become increasingly rare
Not many people can accurately describe the div layout rules by visual inspection. Everyone is just debugging. Just use it once.
The poster is obviously studying DIV CSS with some emotion. What you said is weird. Of course, I don’t think it is like that. Of course, the calculation method of left only counts its own coordinates. Why do we need to calculate it? What about the offset of its parent div? If you really do it like this, it would be really weird.
I think that the DIV CSS method will gradually become mainstream, and table layout will become increasingly rare
The DIV CSS layout is flexible and more suitable for web design. What the poster said The code is often seen in its web pages and is often used.
The values of right and bottom are simply ignored. So what do you need this attribute for? It's like a control panel. You don't know which button can be used and which button can't be used, but they are all there.
Why not? If there is no such attribute, then I want to put the background images of all buttons in one image. How do you set the background? Each of its attributes has its own meaning.
Now I don’t know what layout to use. I will study it later. Basically, the web page is a mess, which is really difficult for those who write browsers. .
Coupled with the incompatibility of various browsers, IE6 had a terrible share before, which made web programmers even more miserable.