CSS Align-items Properties of flexible elastic box model

Source: Internet
Author: User

Instance

Align the <p> elements of the elastic box in the center:

    1. p

    2. {

    3. display : Flex Span class= "pun" style= "Color: #93a1a1" ";

    4. align - Span class= "PLN" style= "color: #48484c" >items : center ;

    5. }

<! DOCTYPE html>

Effect Preview

Browser support

The number in the table represents the version number of the first browser that supports the property.

The number immediately following the-webkit-,-ms-or-moz-is the first version that supports the prefix attribute.

Properties
Align-items 21.0 11.0 20.0 9.0
7.0-webkit-
12.1

Definition and usage

The Align-items property defines the alignment of the Flex subkey in the side axis (vertical axis) direction of the current line of the Flex container.

Tip: Use the Align-self property of each Elastic object element to override the Align-items property.

stretch
inherit: no
can be animated: No. See CSS3 Animated Properties, CSS3 animated instances .
version: CSS3
JavaScript Syntax: object. style.alignitems= "Center" effect preview

CSS syntax


Align-items:stretch|center|flex-start|flex-end|baseline|initial|inherit;

Property value

description test
stretch effect preview
center effect preview
flex-start effect preview
flex-end effect preview
baseline effect preview
initial Set this property to its default value. See initial. effect preview
Inherit Inherit the property from the parent element. See Inherit.
More flexible elastic box model CSS Align-items properties related articles please follow topic.alibabacloud.com!
  • Related Article

    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.