How to fix a p in a certain position; no matter how the screen and resolution change; the position of p will always remain unchanged
怪我咯2017-06-24 09:45:50
position: static | relative | absolute | fixed |
static:
Objects follow regular flow. At this time, the 4 positioning offset attributes will not be applied.
relative:
The object follows the regular flow, and it will not affect any elements in the regular flow when it is offset with reference to its position in the regular flow through the four positioning offset attributes of top, right, bottom, and left.
absolute:
The object breaks away from the regular flow. At this time, the offset attribute refers to the positioned ancestor element closest to itself. If there is no positioned ancestor element, it goes back to the body element. The box's offset position does not affect any elements in the regular flow, and its margins are not collapsed with any other margins.
fixed:
Same as absolute, but the offset positioning is based on the window. When scroll bars appear, objects do not scroll.
仅有的幸福2017-06-24 09:45:50
The p position needs to remain unchanged
The percentage will definitely not work,
Recommended units:
px
rem
Theoretically position
is required:
cannot be statuc