element's position in the document, which generally does not overlap (but specifies that negative margins may overlap). When we use CSS to specify float or position positioning for an element, the positioning of the element will change depending on the situation:1. Specify the float value left/rightThe inline element also becomes invisible to the block element,
the browser shrinks to this element when it is not visible.②fixed: The edge element that contains this value, and the scroll bar does not appear when the browser shrinks to this element when it is not visible.3.2 Example 3.2.1 View3.2.2 CodeDOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">Htmlxmlns= "Http://www.w3.org/1999/xhtml">Head>Title>positionTitle>StyleType= "Text/css">Div{
One of the most common layout class attributes in CSS is float, and the other is CSS positioning attribute position.
1. Position: static
The default positioning of all elements is position: static, which means that the element is not located and appears in the document w
The position attribute used in CSS+DIV,CSS recently to make a Django page is a bit less understood. Take a note here to review.There are several optional values for the Position property:
Static
Relative
Absolute
Fixed
Where the static value is best understood, the value specifies that the ele
In web design, the use of position attributes is very important. Sometimes it will bring us many unexpected difficulties if we do not know this property clearly.
There are four different positioning methods for position properties, namely static, fixed, relative, absolute. Finally, the Z-index property that is closely related to the Position property is introdu
Loat and position both do not have a good or bad problem, both on demand, the desired effect.Float literally means floating, which can be explained more appropriately in typography and the like. Float allows elements to be drawn out of the document stream, which does not account for the flow of documents, and is typically the result of text wrapping around pictures in a picture-and-image mix. And float This
I. Basic positioning principles
For front-end developers, writing CSS is an essential part of front-end development, and the position attribute in CSS is a very important aspect. As the name implies, the position is a setting for positioning HTML elements. It is the cornerstone of
Explanation of CSS Position, csspositionYou can view the difference between relative and aboulute through the navigation menu bar on the top of the website using the Netease website as an example in Google's browser.
Many other attributes of CSS are easy to understand, such as fonts, texts, and backgrounds. Some CSS bo
Css position: absolute, relative, absoluterelative
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 o
You can use the Google browser to the NetEase site as an example, through the top of the site navigation menu bar to see the difference between relative and AbouluteMany of the other properties of CSS are easy to understand, such as fonts, text, backgrounds, and so on. Some CSS books will also be on these simple attributes of the introduction of a very small, but just ignore some difficult properties to exp
rules, which are presented immediately after the previous object, simply to become relative and occupy the document space.Many of the other properties of CSS are easy to understand, such as fonts, text, backgrounds, and so on. Some CSS books will also be on these simple attributes of the introduction of a very small, but just ignore some difficult properties to explain, there is a suspicion of cop. The mai
Author: cutsin
Original address: http://www.moonless.net/blog/2007/09/csspositionz-index.html
Note: This article is only for the exchange of use, if there are improper places to welcome criticism, but please specify the details by, thank you!
Because usually not very used, so the past to write CSS for the position properties of the absolute, relative value of the understanding of the fuzzy, for Z-index Ca
comes to seeWhy is that? I wrote it in front of the blog gesture Sliding End Activity (a) The implementation of basic functions, after reading you will understand.SummarizeThis blog content is not much, the realization of the page is not difficult, just see if you can think of. Of course, some knowledge points are involved:1, the use of property animation,2, the View on the screen location of the acquisition, you can passint location[] = new INT[2];View.getlocationonscreen (location);3, in the
Because usually not very used, so the past to write CSS for the position properties of the absolute, relative value of the understanding of the fuzzy, for Z-index Cascade is not touch the mind, in addition to understanding the factors, the different browser results are also a big problem. Today, read the CSS document, finally, the box model of the floating, posit
Float Property in CSS:The Float property defines the direction in which the element floats. Historically, this property has always been applied to images, so that text surrounds the image, but in CSS, any element can float. A floating element generates a block-level box, regardless of its own element.If floating non-replacement elements, specify a definite width; otherwise, they will be as narrow as possibl
A long time did not come, small brother is Miss Miss me. Because of the recent work with CSS more, so occasionally encounter some of its problems, CSS is very powerful, especially later CSS3. I am learning, if the problems encountered, analysis of deviations, hope everyone Haihan ha!! The following is a question I have just met, perhaps some of the elder Danale will in the mind BS me, but for me, are harves
Css position: relative, absolute, relativeabsolute
Position in CSS is very important in layout, and it is hard to understand a lot of information. The following is my understanding:
Syntax:
Position: Relative | absolute
Relative:
The object follows the regular
Many of the other properties of CSS are easy to understand, such as fonts, text, backgrounds, and so on. Some CSS books will also be on these simple attributes of the introduction of a very small, but just ignore some difficult properties to explain, there is a suspicion of cop. The main hard-to-understand properties of CSS include box-type structures and positio
With regard to the setting of the Position property, the mind has always felt that it is not very clear, so take this opportunity to test it alone, as a learning note. First, the Position property of CSS contains the following four settings:
Static: The default property. Specifies that the element is positioned according to the normal document content Li
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.