(d) Learning CSS position, bottom, left properties

Source: Internet
Author: User

Reference: http://www.w3school.com.cn/cssref/pr_class_position.asp

The Position property specifies the positioning type of the element.

This property defines the positioning mechanism used to create the element layout. Any element can be positioned, but an absolute or fixed element generates a block-level box, regardless of the type of the element itself. Relative positioning elements are offset relative to their default position in the normal flow.

The value Description Absolute generates an absolutely positioned element, relative to theStaticLocates the first parent element other than the anchor. The position of the element is passed" Left","Top"," Right"And"Bottom"attributes are specified. fixedgenerates an absolutely positioned element that is positioned relative to the browser window. The position of the element is passed" Left","Top"," Right"And"Bottom"attributes are specified. The relative generates relatively positioned elements that are positioned relative to their normal positions. Therefore,"left:20"is added to the left position of the element -pixels. StaticThe default value. No positioning, element appears in normal stream (ignore top, bottom, left, right or ZIndex Declaration). Inherit specifies that the value of the position property should be inherited from the parent element. 

Reference: http://www.w3cschool.cn/pr_pos_bottom.html

The bottom property specifies the bottom edge of the element. This property defines the offset between the margin boundary beneath the anchor element and the lower boundary of its containing block.

Note: If the value of the "position" property is "static", setting the "bottom" property has no effect.

Reference: http://www.jb51.net/w3school/css/pr_pos_left.htm

The Left property specifies the right edge of the element. This property defines the offset between the left margin boundary of the anchored element and the left boundary of its containing block.

Note: If the value of the "position" property is "static", setting the "left" property has no effect.

(d) Learning CSS position, bottom, left properties

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.