CSS Learning Summary (1)

Source: Internet
Author: User

Before learning is to put the knowledge points in the book, now re-review carding, the knowledge points to do a summary:

1. block elements : flow from top to bottom (there is a newline between each element);

  Inline Elements : The horizontal direction is next to each other, the overall flow from the upper left to the lower right;

2, for the image , usually not only set the margin, but also set the padding and border;

3, if you want to float (float) an element, you must set a width for this element, the floating element will be removed from the normal flow, floating to the left or right;

4. Centering Technique:

    1. Margin:auto; The browser expands the content area as needed, and ensures that the left and right margins are the same, so the content is centered;
    2. top:50%; left:50%; Webkit-transperent:translate (-50%);

5. Location of position

    1. absolute: The first thing the browser does is to completely remove it from the stream, and then the browser places the element in the position specified by the top and right properties. (You can also use bottom and left to specify the location);  
    2. fixed: The browser will delete it from the normal stream;
    3. relative: will let the element normal flow into the page;

You can specify an absolute position on any element, including block elements and inner-connected elements;

6. Animate Animate

Animate (Params,[duration],[easing],[callback]) (The following three parameters are optional)

    1. Params:options, a set of style properties and their values that are included as animated and final values;
    2. Duration: A string of three booking speeds ("slow", "normal", "fast") or a millisecond value that represents the duration of the animation (for example: 1000);
    3. Easing: The name of the erase effect to use (requires plug-in support), and the default jquery provides "linear" and "swing";
    4. Callback:function, the function that executes when the animation is completed;

CSS Learning Summary (1)

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.