Explanation on css2.0 Handbook:
Setting this attribute value to absolute will drag the object out of the normal Document Stream and definitely locate it without considering the layout of its surrounding content. If other objects with different Z-index attributes occupy a given position, they will not affect each other, but will stack at the same position. At this time, the object does not have an extern
div floating up, for layout.3,* * * * * * * : Floating floating, first floating after moving , floating objects, will first float up, leaving the original position, after moving, is the object behind it. will move up to its original position. @ Location1, positioning of the classification---default value static is not located!!! So it cannot be used as a reference for absolute positioning.---relative posit
The explanation on the CSS2.0 Handbook is:Setting this property value to absolute will drag the object out of the normal document flow to absolute positioning without regard to the layout of the content around it. If other objects with different Z-index properties already occupy a given position, they will not interact with each other and will cascade at the same
feature of relative layout, that is, you can adjust the location and size according to the container size! I used this feature in "log 2 for the development of the imitation codoy music player-writing the search bar" to allow the search button to be moved by myself. The first two fields of this attribute represent the horizontal and vertical displacement values, and the last two fields represent the zoom value. You should practice the specific effect
Static: No special settings, follow the basic positioning rules, can not be graded by Z-index hierarchy.Fixed fixed position the reference object here is a visual window, not a body or parent element. Hierarchical grading can be done through Z-index.CSS2.0 Handbook on the explanation: Set this property value toAbsolute will drag the object out of the normal document flow to absolute position without regard
causes it to overwrite other boxes.When the Position property value is relativeThe position that the object originally occupies is retained, and the object behind it remains in its original position as the original document flowThe value of top indicates how far the object is offset from its original positionThe value of bottom indicates the distance the object
absolute positioning element and other elements.
Let's take a look at the phenomenon that the absolute positioning element disappears mysteriously and is blocked. First, let's take a look at the positioning features involved:1. The default z-index value of the relative positioning element is 0.2. When two relative positions appear at the same time, the z-index b
and Fram cannot coexist. I have said so much above, but I may not quite understand it. In that case, how can I reduce the support for code and instances, the following is an example of screen adaptation to achieve the following description at the same time with absolute layout and relative layout. The effect we want to achieve: When the size and position of the view changes, in order not to overwrite the view, we also need to change the position of t
Microsoft.AspNetCore.Mvc.Routing.UrlActionContext. Generates an//Absolute URL if Microsoft.AspNetCore.Mvc.Routing.UrlActionContext.Protocol and//Microsoft.AspNetCore.Mvc.Routing.UrlActionContext.Host is non-null. // //Parameters://Actioncontext://The context object for the generated URLs for a action method. // //return Result://The generated URL. stringAction (Urlactioncontext actioncontext); // //Summary://converts a vir
other attributes are absolutely located relative to the parent object with the closest positioning settings. If the parent object does not have the positioning attribute set, it still follows the HTML positioning rules, the location is based on the upper left corner of the body object as a reference. The absolute positioning object can be stacked, and the cascade order can be controlled through the Z-index attribute. The Z-index
Reprinted: Position has three values: static (static), relative (relative), and absolute (absolute). Because static is the default value of all page elements, therefore, this value is hardly required when you set the element positioning type unless it is used to overwrite the previous definition.For the latter two, it
the location of the next view. Or in our 4.0-inch normal display of content, on the 3.5-inch screen can also be displayed normally, that is, usually we say the adaptation of the screen. To make it easier to observe, we can use the slider control to dynamically change the view fruit graph above:1. Using absolute layout to achieve the above effect, in order to save our code writing time, the above control is implemented by Storyborad, and then in the c
The absolute positioning element is not rendered in the normal content stream, so margin:auto can make the content pass through top:0; left:0; bottom:0;right:0 the vertical center within the set boundary.
Centering mode:
First, inside the container (within Container)
The parent container of the content block is set to Position:relative, which can be centered in the parent container by using the absolute ce
can be less the code and instance support, the following will be through the screen adaptation of the case to use absolute layout and relative layout at the same time to achieve the following description effect.We want to achieve the effect: when the above view size and position changes, in order not to overwrite the view below, we also have to change the location of the next view. Or in our 4.0-inch normal display of content, on the 3.5-inch screen
Transferred from: front-end development
Original address: http://www.javascript100.com /? P = 72
I can see that many children's shoes do not understand position. I will write an article according to my own understanding.The article mainly involves three questions:1. What is a document stream?2. What is relative positioning?3. What is absolute positioning relative?
Positong attributes
Value
Descr
Detailed explanation of relative and absolute positioning of CSS, detailed explanation of CSS positioning and positioningOriginal article address: http://www.3lian.com/edu/2015/01-31/191131.html csscssand absolute positioning thanks to 3lian8 delivery time: Source: cmsgood zcp
Relative and absolute positioning of CSSNormally, the position attribute
positioned, it will be out of the Document Stream. If the parent level does not set the height, the parent level height will collapse. If the parent level is a row element, there is no other content, the parent width will also collapse.
// The parent element has a 10px padding and the background color is sky blue.
[3] floating
After the element is absolutely positioned, the original floating effect of the element will become invalid.
[4] offset Characteristics
If the top, right, bottom, and l
Positioning (absolute): Drag the object assigned to this targeting method from the document flow, using left,right,top, bottom and other properties to absolutely locate the parent object closest to its nearest location setting, If the parent of an object does not have an anchor property set, or if it follows an HTML positioning rule, it is positioned as a reference based on the upper-left corner of the body object.
the left or right of the image will not show a large block of white.Although the floating syntax is simple, it is not easy to grasp. Let's illustrate how to use floating for layout. Similarly, we need to implement a three-column layout with a footer. For example:
How can we use floating to achieve this effect? It is actually very simple:1. Set the width of E to center E.2. Set the width of A, B, and C, and move A, B, and C to the left.3. Set the clear attribute for the footerIt should be n
positioning boxes are irrelevant to the Document Stream, they can overwrite other elements on the page. You can set the Z-index attribute to control the stacking order of these boxes. The higher the Z-index value, the higher the position of the box in the heap.
Relative to the most recently located ancestor element, the absolute positioning element allows us to achieve some very interesting results. For
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.