diff --git a/CNAME b/CNAME
index 34bd05cf..c1fd02f8 100644
--- a/CNAME
+++ b/CNAME
@@ -1 +1 @@
-cssreference.io
\ No newline at end of file
+cssreference.parryqiu.com
\ No newline at end of file
diff --git a/README.md b/README.md
index 50b2d1c4..c1bbea32 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,11 @@
-# [CSS Reference](http://cssreference.io): a free visual guide to the most popular CSS properties
+# Translated into Chinese: [http://cssreference.parryqiu.com/](http://cssreference.parryqiu.com/)
-[](http://cssreference.io)
+# [CSS Reference](http://cssreference.parryqiu.com): a free visual guide to the most popular CSS properties
+
+[](http://cssreference.parryqiu.com)
# License
The content of this project itself is licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).
-The underlying source code used to format and display that content is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php).
\ No newline at end of file
+The underlying source code used to format and display that content is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php).
diff --git a/_config.local.yml b/_config.local.yml
index 6202fa26..91d69aa2 100644
--- a/_config.local.yml
+++ b/_config.local.yml
@@ -1,5 +1,5 @@
title: CSS Reference
-subtitle: "A free visual guide to the most popular CSS properties"
+subtitle: "免费的 CSS 属性可视化文档"
description: "CSS Reference is a free visual guide to CSS. It features the most popular properties, and explains them with illustrated and animated examples."
share: "CSS Reference: a free visual guide to the most popular CSS properties."
url: http://localhost:4000
diff --git a/_config.yml b/_config.yml
index 8e2570d4..ce4e4c78 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,8 +1,8 @@
-title: CSS Reference
-subtitle: "A free visual guide to the most popular CSS properties"
-description: "CSS Reference is a free visual guide to CSS. It features the most popular properties, and explains them with illustrated and animated examples."
+title: CSS Reference | 免费的 CSS 属性可视化文档
+subtitle: "免费的 CSS 属性可视化文档"
+description: "cssreference.parryqiu.com 是一个免费的 CSS 可视化文档。文档使用了大量的可视化图形以及动画对属性进行了解释。"
share: "CSS Reference: a free visual guide to the most popular CSS properties."
-url: http://cssreference.io
+url: http://cssreference.parryqiu.com
markdown: kramdown
permalink: pretty
exclude: ['node_modules']
diff --git a/_includes/collections/animations.html b/_includes/collections/animations.html
index de1345be..7ff0c0fa 100644
--- a/_includes/collections/animations.html
+++ b/_includes/collections/animations.html
@@ -1,18 +1,18 @@
- Defines how long the animation has to wait before starting. The animation will only be delayed on its first iteration. The animation will wait zero seconds, and thus start right away. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword You can use negative values: the animation will start as if it had already been playing for Defines in which direction the animation is played. The animation is played forwards. When it reaches the end, it starts over at the first keyframe. The animation is played backwards: begins at the last keyframe, finishes at the first keyframe. The animation is played forwards first, then backwards: The animation is played backwards first, then forwards: Defines how long the animation lasts. The default value is zero seconds: the animation will simply not play. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword Defines what happens before an animation starts and after it ends. The fill mode allows to tell the browser if the animation’s styles should also be applied outside of the animation. The animation styles do not affect the default style: the element is set to its default state before the animation starts, and returns to that default state after the animation ends. The last styles applied at the end of the animation are retained afterwards. The animation's styles will already be applied before the animation actually starts. The styles are applied before and after the animation plays. Defines how many times the animation is played. The animation will only play once. You can use integer values to define a specific amount of times the animation will play. By using the keyword Defines which animation keyframes to use. If no animation name is specified, no animation is played. If a name is specified, the keyframes matching that name will be used. For example, the Defines how long the animation has to wait before starting. The animation will only be delayed on its first iteration. The animation will wait zero seconds, and thus start right away. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword You can use negative values: the animation will start as if it had already been playing for Defines in which direction the animation is played. The animation is played forwards. When it reaches the end, it starts over at the first keyframe. The animation is played backwards: begins at the last keyframe, finishes at the first keyframe. The animation is played forwards first, then backwards: The animation is played backwards first, then forwards: Defines how long the animation lasts. The default value is zero seconds: the animation will simply not play. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword Defines what happens before an animation starts and after it ends. The fill mode allows to tell the browser if the animation’s styles should also be applied outside of the animation. The animation styles do not affect the default style: the element is set to its default state before the animation starts, and returns to that default state after the animation ends. The last styles applied at the end of the animation are retained afterwards. The animation's styles will already be applied before the animation actually starts. The styles are applied before and after the animation plays. Defines how many times the animation is played. The animation will only play once. You can use integer values to define a specific amount of times the animation will play. By using the keyword Defines which animation keyframes to use. If no animation name is specified, no animation is played. If a name is specified, the keyframes matching that name will be used. For example, the Another example: the Another example: the Defines if an animation is playing or not. If the The animation is set paused at the first keyframe. This is different than having either no In this example, the square is visible by default, but the on the first keyframe of Defines if an animation is playing or not. If the The animation is set paused at the first keyframe. This is different than having either no In this example, the square is visible by default, but the on the first keyframe of Defines how the values between the start and the end of the animation are calculated. The animation starts slowly, accelerates in the middle, and slows down at the end. The animation starts slowly, and accelerates gradually until the end. The animation starts quickly, and decelerates gradually until the end. Like The animation starts quickly, and decelerates gradually until the end. The animation has a *constant speed. The animation jumps instantly to the final state. The animation stays at the initial state until the end, when it instantly jumps to the final state. By using Shorthand property for Only Defines how the values between the start and the end of the animation are calculated. The animation starts slowly, accelerates in the middle, and slows down at the end. The animation starts slowly, and accelerates gradually until the end. The animation starts quickly, and decelerates gradually until the end. Like The animation starts quickly, and decelerates gradually until the end. The animation has a *constant speed. The animation jumps instantly to the final state. The animation stays at the initial state until the end, when it instantly jumps to the final state. By using Shorthand property for Only Defines how the background image will behave when scrolling the page. The background image will scroll with the page. It will also position and resize itself according to the element it's applied to. The background image will not scroll with the page, and remain positioned according to the viewport. It will also position and resize itself according to the viewport. As a result, the background image will probably only be partially visible. Defines how far the background should extend within the element. The background extends completely throughout the element, even under the border. The background only extends to the edge of the border: it includes the padding but not the border. The background only extends to the edge of the content: it doesn't include the padding, nor the border. Defines the color of the element's background. By default, the background color is transparent, basically meaning that there is no background color. You can use one of the 140+ color names. You can use hexadecimal color codes. You can use rgb() color codes: Each of them can have a value between 0 and 255. You can use rgba() color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). You can use hsl() color codes: You can use hsl()a color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). Defines an image as the background of the element. Removes any background image. Uses the image defined in the url path. This path can either be relative (to the css file) or absolute (like You can define a linear gradient as the background image. You need to define at least two colors. The first one will start at the top, the second one at the bottom. The default angle is You can specify an angle, either in degrees, or with keywords. When using degress, you specify the direction of the gradient, or when it ends. So In this example, You can define a radial gradient as the background image. You need to define at least two colors. The first one will be at the center, the second one at the edges. You can specify the shape of the radial gradient: circle or ellipse (default). You can specify color stops using percentage values. You can specify where the gradient should end: Like with the Defines the origin of the background image. The background image starts at the edge of the border: within padding but not the border. The background image starts under the border. The background image only starts at the edge of the content: it doesn't include the padding, nor the border. Defines the position of the background image. The background image will be positioned at 0% on the horizontal axis and 0% on the vertical axis, which means the top left corner of the element. You can use a combination of position keywords: The background image will be positioned in the center of the element. Defines how the background image repeats itself across the element's background, starting from the background position. The background image will repeat itself both horizontally and vertically. The background image will only repeat itself horizontally. The background image will only repeat itself vertically. The background image will only appear once. Defines the size of the background image. The background image will retain its original size. For example, this background image is 960px by 640px large. Its aspect ratio is 3 by 2. It's bigger than its container (which is 150px high) and will thus be clipped. You can specify a size in pixels: You can use percentage values as well. Beware that this can alter the aspect ratio of the background image, and lead to unexpected results. The keyword The keyword Shorthand property for Defines how the background image will behave when scrolling the page. The background image will scroll with the page. It will also position and resize itself according to the element it's applied to. The background image will not scroll with the page, and remain positioned according to the viewport. It will also position and resize itself according to the viewport. As a result, the background image will probably only be partially visible. Defines how far the background should extend within the element. The background extends completely throughout the element, even under the border. The background only extends to the edge of the border: it includes the padding but not the border. The background only extends to the edge of the content: it doesn't include the padding, nor the border. Defines the color of the element's background. By default, the background color is transparent, basically meaning that there is no background color. You can use one of the 140+ color names. You can use hexadecimal color codes. You can use rgb() color codes: Each of them can have a value between 0 and 255. You can use rgba() color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). You can use hsl() color codes: You can use hsl()a color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). Defines an image as the background of the element. Removes any background image. Uses the image defined in the url path. This path can either be relative (to the css file) or absolute (like You can define a linear gradient as the background image. You need to define at least two colors. The first one will start at the top, the second one at the bottom. The default angle is You can specify an angle, either in degrees, or with keywords. When using degress, you specify the direction of the gradient, or when it ends. So In this example, You can define a radial gradient as the background image. You need to define at least two colors. The first one will be at the center, the second one at the edges. You can specify the shape of the radial gradient: circle or ellipse (default). You can specify color stops using percentage values. You can specify where the gradient should end: Like with the Defines the origin of the background image. The background image starts at the edge of the border: within padding but not the border. The background image starts under the border. The background image only starts at the edge of the content: it doesn't include the padding, nor the border. Defines the position of the background image. The background image will be positioned at 0% on the horizontal axis and 0% on the vertical axis, which means the top left corner of the element. You can use a combination of position keywords: The background image will be positioned in the center of the element. Defines how the background image repeats itself across the element's background, starting from the background position. The background image will repeat itself both horizontally and vertically. The background image will only repeat itself horizontally. The background image will only repeat itself vertically. The background image will only appear once. Defines the size of the background image. The background image will retain its original size. For example, this background image is 960px by 640px large. Its aspect ratio is 3 by 2. It's bigger than its container (which is 150px high) and will thus be clipped. You can specify a size in pixels: You can use percentage values as well. Beware that this can alter the aspect ratio of the background image, and lead to unexpected results. The keyword The keyword Shorthand property for Like Removes the bottom border. You can use pixel values. Like Removes the left border. You can use pixel values. Like Removes the right border. You can use pixel values. Like Removes the top border. You can use pixel values. Defines the width of the element's borders. Defines the width of all borders to 1px. Defines the top and bottom borders to 2px, the left and right to 0. Defines how the width and height of the element are calculated: whether they include the padding and borders or not. The width and height of the element only apply to the content of the element. For example, this element has The full width is 24px + 60px + 200px = 284px. The content has the defined width. The box accomodates for those dimensions. The width and height of the element apply to all parts of the element: the content, the padding and the borders. For example, this element has The full width is 200px, no matter what. The box has the defined width. The content accomodates for those dimensions, and ends up being 200px - 60px - 24px = 116px. Defines the height of the element. The element will automatically adjust its height to allow its content to be displayed correctly. You can use numeric values like pixels, (r)em, percentages... If the content does not fit within the specified height, it will overflow. How the container will handle this overflowing content is defined by the Defines the height of a single line of text. Reverts to the default value of the browser. You can use unitless values: the line height will be relative to the font size. You can use pixel values. You can use em values: like with unitless values, the line height will be relative to the font size. Defines the space outside the element, on the bottom side. Removes any margin at the bottom. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space outside the element, on the left side. Removes any margin on the left. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. The auto keyword will give the left side a share of the remaining space. When combined with Defines the space outside the element, on the right side. Removes any margin on the right. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. The auto keyword will give the right side a share of the remaining space. When combined with Defines the space outside the element, on the top side. Removes any margin at the top. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Shorthand property for Removes all margins. When using 1 value, the margin is set for all 4 sides. When using 2 values: To remember the order think about the values you haven't defined. If you enter 2 values (top/right), you omit setting bottom and left. Because bottom is the vertical counterpart of top, it will use top’s value. And because left is the horizontal counterpart of right, it will use right’s value. When using 3 values: To remember the order think about the values you haven't defined. If you enter 3 values (top/right/bottom), you omit setting left. As right’s counterpart, it will use its value. When using 4 values: To remember the order, start at the top and go clockwise. Defines the maximum height the element can be. The element has no limit in terms of height. You can use numeric values like pixels, (r)em, percentages... If the maximum height is larger than the element's actual height, the max height has no effect. If the content does not fit within the maximum height, it will overflow. How the container will handle this overflowing content is defined by the Defines the maximum width the element can be. The element has no limit in terms of width. You can use numeric values like pixels, (r)em, percentages... If the maximum width is larger than the element's actual width, the max width has no effect. If the content does not fit within the maximum width, it will automatically change the height of the element to accomodate for the wrapping of the content. Defines the minimum height of the element. The element has no minimum height. You can use numeric values like pixels, (r)em, percentages... If the minimum height is larger than the element's actual height, the min height will be applied. If the minimum height is smaller than the element's actual height, the min height has no effect. Defines the minimum width of the element. The element has no minimum width. You can use numeric values like pixels, (r)em, percentages... If the minimum width is larger than the element's actual width, the min width will be applied. If the minimum width is smaller than the element's actual width, the min width has no effect. Defines the space inside the element, on the bottom side. Removes any padding on the bottom. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space inside the element, on the left side. Removes any padding on the left. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space inside the element, on the right side. Removes any padding on the right. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space inside the element, on the top side. Removes any padding on the top. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Shorthand property for Removes all paddings. When using 1 value, the padding is set for all 4 sides. When using 2 values: To remember the order think about the values you haven't defined. If you enter 2 values (top/right), you omit setting bottom and left. Because bottom is the vertical counterpart of top, it will use top’s value. And because left is the horizontal counterpart of right, it will use right’s value. When using 3 values: To remember the order think about the values you haven't defined. If you enter 3 values (top/right/bottom), you omit setting left. As right’s counterpart, it will use its value. When using 4 values: To remember the order, start at the top and go clockwise. Defines the width of the element. The element will automatically adjust its width to allow its content to be displayed correctly. You can use numeric values like pixels, (r)em, percentages... If you use percentages, the value is relative to the container's width. Like Removes the bottom border. You can use pixel values. Like Removes the left border. You can use pixel values. Like Removes the right border. You can use pixel values. Like Removes the top border. You can use pixel values. Defines the width of the element's borders. Defines the width of all borders to 1px. Defines the top and bottom borders to 2px, the left and right to 0. Defines how the width and height of the element are calculated: whether they include the padding and borders or not. The width and height of the element only apply to the content of the element. For example, this element has The full width is 24px + 60px + 200px = 284px. The content has the defined width. The box accomodates for those dimensions. The width and height of the element apply to all parts of the element: the content, the padding and the borders. For example, this element has The full width is 200px, no matter what. The box has the defined width. The content accomodates for those dimensions, and ends up being 200px - 60px - 24px = 116px. Defines the height of the element. The element will automatically adjust its height to allow its content to be displayed correctly. You can use numeric values like pixels, (r)em, percentages... If the content does not fit within the specified height, it will overflow. How the container will handle this overflowing content is defined by the Defines the height of a single line of text. Reverts to the default value of the browser. You can use unitless values: the line height will be relative to the font size. You can use pixel values. You can use em values: like with unitless values, the line height will be relative to the font size. Defines the space outside the element, on the bottom side. Removes any margin at the bottom. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space outside the element, on the left side. Removes any margin on the left. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. The auto keyword will give the left side a share of the remaining space. When combined with Defines the space outside the element, on the right side. Removes any margin on the right. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. The auto keyword will give the right side a share of the remaining space. When combined with Defines the space outside the element, on the top side. Removes any margin at the top. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Shorthand property for Removes all margins. When using 1 value, the margin is set for all 4 sides. When using 2 values: To remember the order think about the values you haven't defined. If you enter 2 values (top/right), you omit setting bottom and left. Because bottom is the vertical counterpart of top, it will use top’s value. And because left is the horizontal counterpart of right, it will use right’s value. When using 3 values: To remember the order think about the values you haven't defined. If you enter 3 values (top/right/bottom), you omit setting left. As right’s counterpart, it will use its value. When using 4 values: To remember the order, start at the top and go clockwise. Defines the maximum height the element can be. The element has no limit in terms of height. You can use numeric values like pixels, (r)em, percentages... If the maximum height is larger than the element's actual height, the max height has no effect. If the content does not fit within the maximum height, it will overflow. How the container will handle this overflowing content is defined by the Defines the maximum width the element can be. The element has no limit in terms of width. You can use numeric values like pixels, (r)em, percentages... If the maximum width is larger than the element's actual width, the max width has no effect. If the content does not fit within the maximum width, it will automatically change the height of the element to accomodate for the wrapping of the content. Defines the minimum height of the element. The element has no minimum height. You can use numeric values like pixels, (r)em, percentages... If the minimum height is larger than the element's actual height, the min height will be applied. If the minimum height is smaller than the element's actual height, the min height has no effect. Defines the minimum width of the element. The element has no minimum width. You can use numeric values like pixels, (r)em, percentages... If the minimum width is larger than the element's actual width, the min width will be applied. If the minimum width is smaller than the element's actual width, the min width has no effect. Defines the space inside the element, on the bottom side. Removes any padding on the bottom. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space inside the element, on the left side. Removes any padding on the left. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space inside the element, on the right side. Removes any padding on the right. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Defines the space inside the element, on the top side. Removes any padding on the top. You can use pixel values. You can use (r)em values. The value is relative to the font size: You can use percentage values. Shorthand property for Removes all paddings. When using 1 value, the padding is set for all 4 sides. When using 2 values: To remember the order think about the values you haven't defined. If you enter 2 values (top/right), you omit setting bottom and left. Because bottom is the vertical counterpart of top, it will use top’s value. And because left is the horizontal counterpart of right, it will use right’s value. When using 3 values: To remember the order think about the values you haven't defined. If you enter 3 values (top/right/bottom), you omit setting left. As right’s counterpart, it will use its value. When using 4 values: To remember the order, start at the top and go clockwise. Defines the width of the element. The element will automatically adjust its width to allow its content to be displayed correctly. You can use numeric values like pixels, (r)em, percentages... If you use percentages, the value is relative to the container's width. Defines how each line is aligned within a flexbox container. It only applies if Each line will stretch to fill the remaining space. In this case, the container is This remaining space is distributed equally amongst the two lines: Each line will only fill the space it needs. They will all move towards the start of the flexbox container's cross axis. Each line will only fill the space it needs. They will all move towards the end of the flexbox container's cross axis. Each line will only fill the space it needs. They will all move towards the center of the flexbox container's cross axis. Each line will only fill the space it needs. The remaining space will appear between the lines. Each line will only fill the space it needs. The remaining space will be distributed equally around the lines: before the first line, between the two, and after the last one. Defines how flexbox items are aligned according to the cross axis, within a line of a flexbox container. The flexbox items are aligned at the start of the cross axis. By default, the cross axis is vertical. This means the flexbox items will be aligned vertically at the top. The flexbox items are aligned at the end of the cross axis. By default, the cross axis is vertical. This means the flexbox items will be aligned vertically at the bottom. The flexbox items are aligned at the center of the cross axis. By default, the cross axis is vertical. This means the flexbox items will be centered vertically. The flexbox items are aligned at the baseline of the cross axis. By default, the cross axis is vertical. This means the flexbox items will align themselves in order to have the baseline of their text align along a horizontal line. The flexbox items will stretch across the whole cross axis. By default, the cross axis is vertical. This means the flexbox items will fill up the whole vertical space. Works like The target will use the value of If the container has By default, this means it will be aligned vertically at the top. If the container has By default, this means it will be aligned vertically at the bottom. If the container has By default, this means it will be vertically centered. If the container has By default, this means it will be aligned along the basline of the text. If the container has Defines the initial size of a flexbox item. The element will be automatically sized based on its content, or on any You can define pixel or (r)em values. The element will wrap its content to avoid any overflow. Defines how flexbox items are ordered within a flexbox container. The flexbox items are ordered the same way as the text direction, along the main axis. The flexbox items are ordered the opposite way as the text direction, along the main axis. The flexbox items are ordered the same way as the text direction, along the cross axis. The flexbox items are ordered the opposite way as the text direction, along the cross axis. Shorthand property for Defines how much a flexbox item should grow if there's space available. The element will not grow if there's space available. It will only use the space it needs. The element will grow by a factor of 1. It will fill up the remaining space if no other flexbox item has a Because the flex-grow value is relative, its behaviour depends on the value of the flexbox item siblings. In this example, the remaining space is divided in 3: Defines how much a flexbox item should shrink if there's not enough space available. If there's not enough space available in the container's main axis, the element will shrink by a factor of 1, and will wrap its content. The element will not shrink: it will retain the width it needs, and not wrap its content. Its siblings will shrink to give space to the target element. Because the target element will not wrap its content, there is a chance for the flexbox container's content to overflow. Because the flex-shrink value is relative, its behaviour depends on the value of the flexbox item siblings. In this example, the green item wants to fill 100% of the width. The space it needs is taken from its two siblings, and is divided in 4: Defines if flexbox items appear on a single line or on multiple lines within a flexbox container. The flexbox items will remain on a single line, no matter what, and will eventually overflow if needed. The flexbox items will be distributed among multiple lines if needed. The flexbox items will be distributed among multiple lines if needed. Any additional line will appear before the previous one. Defines how flexbox items are aligned according to the main axis, within a flexbox container. The flexbox items are pushed towards the start of the container's main axis. The flexbox items are pushed towards the end of the container's main axis. The flexbox items are centered along the container's main axis. The remaining space is distributed between the flexbox items. The remaining space is distributed around the flexbox items: this adds space before the first item and after the last one. Defines the order of a flexbox item. The order of the flexbox items is the one defined in the HTML code. The order is relative to the flexbox item's siblings. The final order is defined when all individual flexbox item order values are taken into account. You can use negative values. You can set a different value for each flexbox item. 定义 flexbox 容器中每一行的对齐方式。此属性仅当预先设置了 每一行拉伸平分并填充剩余空间 此示例中,容器高为 剩余空间被两行平分: 每一行仅仅占用实际所需的空间。所有的元素都将靠纵向轴起始处对齐。 每一行仅仅占用实际所需的空间。所有的元素都将靠纵向轴末尾处对齐。 每一行仅仅占用实际所需的空间。所有的元素都将靠纵向轴中间对齐。 每一行仅仅占用实际所需的空间。剩余空间占据行之间。 每一行仅仅占用实际所需的空间。剩余空间平均分配给行元素之间(上下)。 定义了在 flexbox 容器的一行内,子元素在纵向轴的对齐方式。 flexbox 的子元素按照纵向轴的起始处对齐。 默认,纵向轴是垂直的,所以这就意味着 flexbox 的子元素对齐于垂直方向的顶部。 flexbox 的子元素按照纵向轴的末尾处对齐。 默认,纵向轴是垂直的,所以这就意味着 flexbox 的子元素对齐于垂直方向的底部。 flexbox 的子元素按照纵向轴的中间对齐。 默认,纵向轴是垂直的,所以这就意味着 flexbox 的子元素对齐于垂直方向的中间。 flexbox 的子元素按照纵向轴的 baseline 对齐。 默认,纵向轴是垂直的,所以这就意味着 flexbox 的子元素对齐于以自身文字为横向水平线的baseline。 flexbox 的子元素将拉伸覆盖整个纵向轴。 默认,纵向轴是垂直的,所以这就意味着 flexbox 的子元素将填满整个纵向的空间。 原理如同
+ 元素使用
+
+
+ 如果容器有属性 默认,这就意味着元素对齐于垂直方向的顶部。
+
+
+ 如果容器有属性 默认,这就意味着元素对齐于垂直方向的底部。
+
+
+ 如果容器有属性 默认,这就意味着元素对齐于垂直方向的中间。
+
+
+ 如果容器有属性 默认,这就意味着元素沿着文字的 baseline 对齐。
+
+
+ 如果容器有属性 定义 flexbox 的初始化大小。
+ 元素根据自身的内容自动调整大小,或者根据已定义的
+
+
+ 你可以定义 pixel 或 (r)em 值。元素将换行其内容避开任何的元素溢出。 定义了元素在 flexbox 容器中的排序方式。
+ 元素按照与文字方向(书写模式)相同的方向,沿着主(横)轴。
+
+
+ 元素按照与文字方向(书写模式)相反的方向,沿着主(横)轴。
+
+
+ 元素按照与文字方向(书写模式)相同的方向,沿着纵向轴。
+
+
+ 元素按照与文字方向(书写模式)相反的方向,沿着纵向轴。 是 定义了元素当有可用空间的时候如何 占用。
+ 元素 不 不占用剩余空间。它仅仅占用自身所需空间。
+
+
+ 元素将 占用 扩展因子 1。如果没有其他元素也设置了
+
+
+ 因为 flex-grow 的值是相对的,它的具体表现还取决于此元素的同级元素。 在这个例子中,剩余空间被分隔成了 3 个扩展因子: 定义了当没有足够空间的时候,元素如何压缩自身空间。
+ 当主轴(横向轴)没有足够空间的时候,元素将按照扩展因子 1 来进行压缩,也将导致换行(折叠)其自身的内容。
+
+
+ 元素不压缩:占用它所需要的宽且不换行(折叠)自身的内容。同级元素将压缩给出目标元素足够的控件。 因为目标元素不换行(折叠)自身的内容,所以可能会导致 flexbox 容器的内容产生元素移除。
+
+
+ 因为 flex-shrink 的值是相对的,它的具体表现还取决于此元素的同级元素。 在此例子中,绿色的元素占用了 100% 的宽度。此部分的空间将从它的两个同级元素中占用,并且占用被分成了 4份: 定义了元素在 flexbox 容器中是显示一行还是多行。
+ 元素将始终保持单行,最终,如果需要将会进行元素溢出。
+
+
+ 元素将根据实际情况分布在多行。
+
+
+ 元素将根据实际情况分布在多行。任何新增的行都将会被添加在之前的一行之前。 定义了在 flexbox 容器中,元素沿着主轴(横向轴)的对齐情况。
+ 元素朝着主轴(横向轴)的开始方向排列。
+
+
+ 元素朝着主轴(横向轴)的末尾方向排列。
+
+
+ 元素朝着主轴(横向轴)的中间排列。
+
+
+ 剩余的空间平均分布在元素之间。
+
+
+ 剩余的空间平均分布在元素的开始和结束处:在第一个元素的前面和最后一个元素的后面也分配空间。 定义元素的排序。
+ 元素的排序按照其 HTML 代码中的排序。
+
+
+ 元素的排序与其同级元素具有相关性。最终的排序将会考虑到所有元素的排序值。
+
+
+ 值你可以使用负数。
+
+
+ 你可以为每一个元素设置不同的值。 Defines the position of the element according to its bottom edge. The element will remain in its natural position. If the element is in position relative, the element will move upwards by the amount defined by the bottom value. If the element is in position absolute, the element will position itself from the bottom of the first positioned ancestor. Defines the position of the element according to its left edge. The element will remain in its natural position. If the element is in position relative, the element will move left by the amount defined by the left value. If the element is in position absolute, the element will position itself from the left of the first positioned ancestor. Defines the position behavior of the element. The element will remain in the natural flow of the page. As a result, it will not act as anchor point for the absolutely positioned pink block. Also, it will not react to the following properties: The element will remain in the natural flow of the page. It also makes the element positioned: it will act as an anchor point for the absolutely positioned pink block. Also, it will react to the following properties: The element will not remain in the natural flow of the page. It will position itself according to the closest positioned ancestor. Because it's positioned, it will act as an anchor point for the absolutely positioned pink block. Also, it will react to the following properties: The element will not remain in the natural flow of the page. It will position itself according to the viewport. Because it's positioned, it will act as an anchor point for the absolutely positioned pink block. Also, it will react to the following properties: Defines the position of the element according to its right edge. The element will remain in its natural position. If the element is in position relative, the element will move right by the amount defined by the right value. If the element is in position absolute, the element will position itself from the right of the first positioned ancestor. Defines the position of the element according to its top edge. The element will remain in its natural position. If the element is in position relative, the element will move downwards by the amount defined by the top value. If the element is in position absolute, the element will position itself from the top of the first positioned ancestor. Defines the order of the elements on the z-axis. It only works on positioned elements (anything apart from The order is defined by the order in the HTML code: The z-index value is relative to the other ones. The target element is move in front of its siblings. You can use negative values. The target element is move in behind its siblings. Defines the position of the element according to its bottom edge. The element will remain in its natural position. If the element is in position relative, the element will move upwards by the amount defined by the bottom value. If the element is in position absolute, the element will position itself from the bottom of the first positioned ancestor. Defines the position of the element according to its left edge. The element will remain in its natural position. If the element is in position relative, the element will move left by the amount defined by the left value. If the element is in position absolute, the element will position itself from the left of the first positioned ancestor. Defines the position behavior of the element. The element will remain in the natural flow of the page. As a result, it will not act as anchor point for the absolutely positioned pink block. Also, it will not react to the following properties: The element will remain in the natural flow of the page. It also makes the element positioned: it will act as an anchor point for the absolutely positioned pink block. Also, it will react to the following properties: The element will not remain in the natural flow of the page. It will position itself according to the closest positioned ancestor. Because it's positioned, it will act as an anchor point for the absolutely positioned pink block. Also, it will react to the following properties: The element will not remain in the natural flow of the page. It will position itself according to the viewport. Because it's positioned, it will act as an anchor point for the absolutely positioned pink block. Also, it will react to the following properties: Defines the position of the element according to its right edge. The element will remain in its natural position. If the element is in position relative, the element will move right by the amount defined by the right value. If the element is in position absolute, the element will position itself from the right of the first positioned ancestor. Defines the position of the element according to its top edge. The element will remain in its natural position. If the element is in position relative, the element will move downwards by the amount defined by the top value. If the element is in position absolute, the element will position itself from the top of the first positioned ancestor. Defines the order of the elements on the z-axis. It only works on positioned elements (anything apart from The order is defined by the order in the HTML code: The z-index value is relative to the other ones. The target element is move in front of its siblings. You can use negative values. The target element is move in behind its siblings. Defines how long the transition has to wait before starting. The transition will wait zero seconds, and thus start right away. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword You can use negative values: the transition will start as if it had already been playing for Defines how long the transition lasts. The transition will last zero seconds, and is thus instant. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword Defines which properties will transition. The element will transition all properties: The element will transition no property: the transition is thus instant. The element will only transtion the background property. The element will only transtion the color property. The element will only transtion the transform property. Defines how the values between the start and the end of the transition are calculated. The transition starts slowly, accelerates in the middle, and slows down at the end. The transition starts slowly, and accelerates gradually until the end. The transition starts quickly, and decelerates gradually until the end. Like The transition starts quickly, and decelerates gradually until the end. The transition has a *constant speed. The transition jumps instantly to the final state. The transition stays at the initial state until the end, when it instantly jumps to the final state. By using Shorthand property for Only You can combine multiple properties with their own transition duration. Defines how long the transition has to wait before starting. The transition will wait zero seconds, and thus start right away. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword You can use negative values: the transition will start as if it had already been playing for Defines how long the transition lasts. The transition will last zero seconds, and is thus instant. You can use decimal values in seconds with the keyword You can use milliseconds instead of seconds, with the keyword Defines which properties will transition. The element will transition all properties: The element will transition no property: the transition is thus instant. The element will only transtion the background property. The element will only transtion the color property. The element will only transtion the transform property. Defines how the values between the start and the end of the transition are calculated. The transition starts slowly, accelerates in the middle, and slows down at the end. The transition starts slowly, and accelerates gradually until the end. The transition starts quickly, and decelerates gradually until the end. Like The transition starts quickly, and decelerates gradually until the end. The transition has a *constant speed. The transition jumps instantly to the final state. The transition stays at the initial state until the end, when it instantly jumps to the final state. By using Shorthand property for Only You can combine multiple properties with their own transition duration. Defines the color of the text. Applies a transparent color to the text. The text will still take up the space it should. You can use one of the 140+ color names. You can use hexadecimal color codes. You can use rgb() color codes: Each of them can have a value between 0 and 255. You can use rgba() color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). You can use hsl() color codes: You can use hsl()a color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). When using multiple values, the The browser will look for each family on the user's computer and in any @font-face resource. The list is prioritized from left to right: it will use the first value if it's available, or go to the next one, until the end of the list is reached. The default font family is defined by the browser preferences. In this example, the browser will try to use The browser will use a serif font family: all characters have stroke endings. The browser will use a sans-serif font family: no character has stroke endings. The browser will use a monospace font family: all characters have the same width. The browser will use a cursive font family. The browser will use a fantasy font family. Defines the size of the text. The text will use the browser's default medium size. You can use pixel values. You can use em values. The value is relative to the parent's You can use rem values. The value is relative to the root element's You can use percentage values. They act like em values. The value is relative to the parent's You can use relative keywords. The value is relative to the parent. The following are available: You can use absolute keywords. The value is relative to the root element The following are available: Defines how much the text is slanted. The text is not slanted. Use the italic version of the font: the letters are slightly slanted. Use the oblique version of the font: the letters are more slanted than italic. Defines which glyph to use for each letter. Each letter uses its normal glyph. Each letter uses its small capitalized version. Defines the weight of the text. The text is in normal weight. The text becomes bold. You can use numeric values. They all correspond to a particular named weight: If the font family doesn't provide the requested weight, it will use the closest available one. You can use relative keywords: Shorthand property for Defines the spacing between the characters of a block of text. The spacing between the characters is normal. You can use pixel values. You can use em values: this allows the spacing to remain relative to the font-size. Defines the height of a single line of text. Reverts to the default value of the browser. You can use unitless values: the line height will be relative to the font size. You can use pixel values. You can use em values: like with unitless values, the line height will be relative to the font size. Defines how the text content of the element is horizontally aligned. The text content is aligned to the left. The text content is aligned to the right. The text content is centered. The text content is justified. Defines how the text content of the element is decorated. Removes any text decoration. Underlines the text content. Defines the indentation of the element's first line of text. The text is not indented. You can use numeric values like pixels, (r)em, percentages... Notice how only the first line is indented. You can also use negative values. Defines how the hidden text content behaves if it's overflowing. The text content is clipped and not accessible. The overflowing content is replaced by an ellipsis: Defines the shadow of the text content. The text content has no shadow. You need at least two values: The shadow color will be inherited from the text color. You can define a color as the last value. As with The optional third value defines the blur of the shadow. The color will be diffused across 10px in this example, from opaque to transparent. Defines how the text content should be transformed. Removes any text transformation: the text will appear the same as in the HTML code. Turns the first letter of each word into a capital letter. Turns all letters into capital letters. Turns all letters into lowercase letters. Defines how the element's white space is handled. Sequences of spaces are combined into one. Sequences of spaces are combined into one. The white space is exactly preserved. The white space is mostly preserved. Only new lines are preserved. Defines how words should break when reaching the end of a line. Words with no space will not break. Sequences of uninterrupted characters will be displayed on a single line. Words with no space will break as soon as they reach the end of a line. Defines the spacing between words of a block of text. The spacing between the characters is normal. You can use pixel values. You can use em values: this allows the spacing to remain relative to the font-size. Defines the color of the text. Applies a transparent color to the text. The text will still take up the space it should. You can use one of the 140+ color names. You can use hexadecimal color codes. You can use rgb() color codes: Each of them can have a value between 0 and 255. You can use rgba() color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). You can use hsl() color codes: You can use hsl()a color codes: The alpha value can go from zero 0 (transparent) to one 1 (opaque). When using multiple values, the The browser will look for each family on the user's computer and in any @font-face resource. The list is prioritized from left to right: it will use the first value if it's available, or go to the next one, until the end of the list is reached. The default font family is defined by the browser preferences. In this example, the browser will try to use The browser will use a serif font family: all characters have stroke endings. The browser will use a sans-serif font family: no character has stroke endings. The browser will use a monospace font family: all characters have the same width. The browser will use a cursive font family. The browser will use a fantasy font family. Defines the size of the text. The text will use the browser's default medium size. You can use pixel values. You can use em values. The value is relative to the parent's You can use rem values. The value is relative to the root element's You can use percentage values. They act like em values. The value is relative to the parent's You can use relative keywords. The value is relative to the parent. The following are available: You can use absolute keywords. The value is relative to the root element The following are available: Defines how much the text is slanted. The text is not slanted. Use the italic version of the font: the letters are slightly slanted. Use the oblique version of the font: the letters are more slanted than italic. Defines which glyph to use for each letter. Each letter uses its normal glyph. Each letter uses its small capitalized version. Defines the weight of the text. The text is in normal weight. The text becomes bold. You can use numeric values. They all correspond to a particular named weight: If the font family doesn't provide the requested weight, it will use the closest available one. You can use relative keywords: Shorthand property for Defines the spacing between the characters of a block of text. The spacing between the characters is normal. You can use pixel values. You can use em values: this allows the spacing to remain relative to the font-size. Defines the height of a single line of text. Reverts to the default value of the browser. You can use unitless values: the line height will be relative to the font size. You can use pixel values. You can use em values: like with unitless values, the line height will be relative to the font size. Defines how the text content of the element is horizontally aligned. The text content is aligned to the left. The text content is aligned to the right. The text content is centered. The text content is justified. Defines how the text content of the element is decorated. Removes any text decoration. Underlines the text content. Defines the indentation of the element's first line of text. The text is not indented. You can use numeric values like pixels, (r)em, percentages... Notice how only the first line is indented. You can also use negative values. Defines how the hidden text content behaves if it's overflowing. The text content is clipped and not accessible. The overflowing content is replaced by an ellipsis: Defines the shadow of the text content. The text content has no shadow. You need at least two values: The shadow color will be inherited from the text color. You can define a color as the last value. As with The optional third value defines the blur of the shadow. The color will be diffused across 10px in this example, from opaque to transparent. Defines how the text content should be transformed. Removes any text transformation: the text will appear the same as in the HTML code. Turns the first letter of each word into a capital letter. Turns all letters into capital letters. Turns all letters into lowercase letters. Defines how the element's white space is handled. Sequences of spaces are combined into one. Sequences of spaces are combined into one. The white space is exactly preserved. The white space is mostly preserved. Only new lines are preserved. Defines how words should break when reaching the end of a line. Words with no space will not break. Sequences of uninterrupted characters will be displayed on a single line. Words with no space will break as soon as they reach the end of a line. Defines the spacing between words of a block of text. The spacing between the characters is normal. You can use pixel values. You can use em values: this allows the spacing to remain relative to the font-size.#animation-delay
default animation-delay: 0s;animation-delay: 1.2s;s.animation-delay: 2400ms;ms.animation-delay: -500ms;500ms.#animation-direction
default animation-direction: normal;animation-direction: reverse;animation-direction: alternate;animation-direction: alternate-reverse;#animation-duration
default animation-duration: 0s;animation-duration: 1.2s;s.animation-duration: 2400ms;ms.#animation-fill-mode
default animation-fill-mode: none;animation-fill-mode: forwards;animation-fill-mode: backwards;animation-fill-mode: both;#animation-iteration-count
default animation-iteration-count: 1;animation-iteration-count: 2;animation-iteration-count: infinite;infinite, the animation will play indefinitely.#animation-name
default animation-name: none;animation-name: fadeIn;fadeIn animation looks like this:@keyframes fadeIn {
+#animation-delay
默认属性 animation-delay: 0s;animation-delay: 1.2s;s.animation-delay: 2400ms;ms.animation-delay: -500ms;500ms.#animation-direction
默认属性 animation-direction: normal;animation-direction: reverse;animation-direction: alternate;animation-direction: alternate-reverse;#animation-duration
默认属性 animation-duration: 0s;animation-duration: 1.2s;s.animation-duration: 2400ms;ms.#animation-fill-mode
默认属性 animation-fill-mode: none;animation-fill-mode: forwards;animation-fill-mode: backwards;animation-fill-mode: both;#animation-iteration-count
默认属性 animation-iteration-count: 1;animation-iteration-count: 2;animation-iteration-count: infinite;infinite, the animation will play indefinitely.#animation-name
默认属性 animation-name: none;animation-name: fadeIn;fadeIn animation looks like this:@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
-}animation-name: moveRight;moveRight animation:@keyframes moveRight {
+}animation-name: moveRight;moveRight animation:@keyframes moveRight {
from {
transform: translateX(0);
}
to {
transform: translateX(100px);
}
-}#animation-play-state
default animation-play-state: running;animation-duration and animation-name are defined, the animation will start playing automatically.animation-play-state: paused;animation-duration or animation-name at all. If the animation is paused, the style applied is that of the first keyframe, and not the default style.fadeAndMove, the opacity is set to 0. When paused, the animation will be "stuck" on this first keyframe, and will thus be invisible.@keyframes fadeAndMove {
+}#animation-play-state
默认属性 animation-play-state: running;animation-duration and animation-name are defined, the animation will start playing automatically.animation-play-state: paused;animation-duration or animation-name at all. If the animation is paused, the style applied is that of the first keyframe, and not the default style.fadeAndMove, the opacity is set to 0. When paused, the animation will be "stuck" on this first keyframe, and will thus be invisible.@keyframes fadeAndMove {
from {
opacity: 0;
transform: translateX(0);
@@ -21,4 +21,4 @@
opacity: 0;
transform: translateX(100px);
}
-}#animation-timing-function
default animation-timing-function: ease;animation-timing-function: ease-in;animation-timing-function: ease-out;animation-timing-function: ease-in-out;ease, but more pronounced.animation-timing-function: linear;animation-timing-function: step-start;animation-timing-function: step-end;animation-timing-function: steps(4, end);steps() with an integer, you can define a specific number of steps before reaching the end. The state of the element will not vary gradually, but rather jump from state to state in separate instants.#animation
animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode and animation-play-state.animation-duration and animation-name are required.#animation-timing-function
默认属性 animation-timing-function: ease;animation-timing-function: ease-in;animation-timing-function: ease-out;animation-timing-function: ease-in-out;ease, but more pronounced.animation-timing-function: linear;animation-timing-function: step-start;animation-timing-function: step-end;animation-timing-function: steps(4, end);steps() with an integer, you can define a specific number of steps before reaching the end. The state of the element will not vary gradually, but rather jump from state to state in separate instants.#animation
animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode and animation-play-state.animation-duration and animation-name are required.#background-attachment
default background-attachment: scroll;background-attachment: fixed;#background-clip
default background-clip: border-box;background-clip: padding-box;background-clip: content-box;#background-color
default background-color: transparent;background-color: red;background-color: #05ffb0;background-color: rgb(50, 115, 220);redgreenbluebackground-color: rgba(50, 115, 220, 0.3);rgbalpha channel and defines the opacity of the colorbackground-color: hsl(14, 100%, 53%);hue and can go from 0 to 359saturation and go from 0% to 100%luminosity and go from 0% to 100%background-color: hsla(14, 100%, 53%, 0.6);hslalpha channel and defines the opacity of the color#background-image
default background-image: none;background-image: url(/images/jt.png);http://cssreference.io/images/jt.png).background-image: linear-gradient(red, blue);to bottom (or 180deg), which means the gradient is vertical, starting at the top, ending at the bottom of the element.background-image: linear-gradient(45deg, red, blue);0deg means the the top of the element, like 12:00 on a clock.45deg means 2:30, or the top right corner.background-image: radial-gradient(green, purple);background-image: radial-gradient(circle, green, purple);background-image: radial-gradient(circle, green 0%, purple 20%, orange 100%);background-image: radial-gradient(circle closest-side, green 0%, purple 20%, orange 100%);closest-sideclosest-cornerfarthest-sidefarthest-cornerbackground-image: radial-gradient(circle closest-side at 45px 45px, green 0%, purple 20%, orange 100%);background-position, you can specify the position of the gradient.#background-origin
default background-origin: padding-box;background-origin: border-box;background-origin: content-box;#background-position
default background-position: 0% 0%;background-position: bottom right;center, top, bottom, left and right.background-position: center center;#background-repeat
default background-repeat: repeat;background-repeat: repeat-x;background-repeat: repeat-y;background-repeat: no-repeat;#background-size
default background-size: auto auto;background-size: 120px 80px;background-size: 100% 50%;background-size: contain;contain will resize the background image to make sure it remains fully visible.background-size: cover;cover will resize the background image to make sure the element is fully covered.#background
background-image background-position background-size background-repeat background-origin background-clip background-attachment and background-color.#background-attachment
默认属性 background-attachment: scroll;background-attachment: fixed;#background-clip
默认属性 background-clip: border-box;background-clip: padding-box;background-clip: content-box;#background-color
默认属性 background-color: transparent;background-color: red;background-color: #05ffb0;background-color: rgb(50, 115, 220);redgreenbluebackground-color: rgba(50, 115, 220, 0.3);rgbalpha channel and defines the opacity of the colorbackground-color: hsl(14, 100%, 53%);hue and can go from 0 to 359saturation and go from 0% to 100%luminosity and go from 0% to 100%background-color: hsla(14, 100%, 53%, 0.6);hslalpha channel and defines the opacity of the color#background-image
默认属性 background-image: none;background-image: url(/images/jt.png);http://cssreference.parryqiu.com/images/jt.png).background-image: linear-gradient(red, blue);to bottom (or 180deg), which means the gradient is vertical, starting at the top, ending at the bottom of the element.background-image: linear-gradient(45deg, red, blue);0deg means the the top of the element, like 12:00 on a clock.45deg means 2:30, or the top right corner.background-image: radial-gradient(green, purple);background-image: radial-gradient(circle, green, purple);background-image: radial-gradient(circle, green 0%, purple 20%, orange 100%);background-image: radial-gradient(circle closest-side, green 0%, purple 20%, orange 100%);closest-sideclosest-cornerfarthest-sidefarthest-cornerbackground-image: radial-gradient(circle closest-side at 45px 45px, green 0%, purple 20%, orange 100%);background-position, you can specify the position of the gradient.#background-origin
默认属性 background-origin: padding-box;background-origin: border-box;background-origin: content-box;#background-position
默认属性 background-position: 0% 0%;background-position: bottom right;center, top, bottom, left and right.background-position: center center;#background-repeat
默认属性 background-repeat: repeat;background-repeat: repeat-x;background-repeat: repeat-y;background-repeat: no-repeat;#background-size
默认属性 background-size: auto auto;background-size: 120px 80px;background-size: 100% 50%;background-size: contain;contain will resize the background image to make sure it remains fully visible.background-size: cover;cover will resize the background image to make sure the element is fully covered.#background
background-image background-position background-size background-repeat background-origin background-clip background-attachment and background-color.#border-bottom-width
border-width, but for the bottom border only.default border-bottom-width: 0;border-bottom-width: 4px;#border-left-width
border-width, but for the left border only.default border-left-width: 0;border-left-width: 4px;#border-right-width
border-width, but for the right border only.default border-right-width: 0;border-right-width: 4px;#border-top-width
border-width, but for the top border only.default border-top-width: 0;border-top-width: 4px;#border-width
border-width: 1px;border-width: 2px 0;#box-sizing
default box-sizing: content-box;border-width: 12pxpadding: 30pxwidth: 200pxbox-sizing: border-box;border-width: 12pxpadding: 30pxwidth: 200px#height
default height: auto;height: 100px;overflow property.#line-height
default line-height: normal;recommended line-height: 1.6;line-height: 30px;line-height: 0.8em;#margin-bottom
default margin-bottom: 0;margin-bottom: 30px;margin-bottom: 2em;<html> the root element's font sizemargin-bottom: 10%;
The percentage is based on the width of the container.#margin-left
default margin-left: 0;margin-left: 50px;margin-left: 7em;<html> the root element's font sizemargin-left: 30%;
The percentage is based on the width of the container.margin-left: auto;margin-right: auto, it will center the element, if a fixed width is defined.#margin-right
default margin-right: 0;margin-right: 50px;margin-right: 7em;<html> the root element's font sizemargin-right: 30%;
The percentage is based on the width of the container.margin-right: auto;margin-left: auto, it will center the element, if a fixed width is defined.#margin-top
default margin-top: 0;margin-top: 30px;margin-top: 2em;<html> the root element's font sizemargin-top: 10%;
The percentage is based on the width of the container.#margin
margin-top margin-right margin-bottom and margin-left.default margin: 0;margin: 30px;margin: 30px 60px;margin: 30px 60px 45px;margin: 30px 60px 45px 85px;#max-height
default max-height: none;max-height: 2000px;max-height: 100px;overflow property.#max-width
default max-width: none;max-width: 2000px;max-width: 150px;#min-height
default min-height: 0;min-height: 200px;min-height: 5px;#min-width
default min-width: 0;min-width: 300px;min-width: 5px;#padding-bottom
default padding-bottom: 0;padding-bottom: 50px;padding-bottom: 7em;<html> the root element's font sizepadding-bottom: 30%;
The percentage is based on the width of the element.#padding-left
default padding-left: 0;padding-left: 50px;padding-left: 7em;<html> the root element's font sizepadding-left: 30%;
The percentage is based on the width of the element.#padding-right
default padding-right: 0;padding-right: 50px;padding-right: 7em;<html> the root element's font sizepadding-right: 30%;
The percentage is based on the width of the element.#padding-top
default padding-top: 0;padding-top: 50px;padding-top: 7em;<html> the root element's font sizepadding-top: 30%;
The percentage is based on the width of the element.#padding
padding-top padding-right padding-bottom and padding-left.default padding: 0;padding: 30px;padding: 30px 60px;padding: 30px 60px 45px;padding: 30px 60px 45px 85px;#width
default width: auto;width: 240px;width: 50%;#border-bottom-width
border-width, but for the bottom border only.默认属性 border-bottom-width: 0;border-bottom-width: 4px;#border-left-width
border-width, but for the left border only.默认属性 border-left-width: 0;border-left-width: 4px;#border-right-width
border-width, but for the right border only.默认属性 border-right-width: 0;border-right-width: 4px;#border-top-width
border-width, but for the top border only.默认属性 border-top-width: 0;border-top-width: 4px;#border-width
border-width: 1px;border-width: 2px 0;#box-sizing
默认属性 box-sizing: content-box;border-width: 12pxpadding: 30pxwidth: 200pxbox-sizing: border-box;border-width: 12pxpadding: 30pxwidth: 200px#height
默认属性 height: auto;height: 100px;overflow property.#line-height
默认属性 line-height: normal;recommended line-height: 1.6;line-height: 30px;line-height: 0.8em;#margin-bottom
默认属性 margin-bottom: 0;margin-bottom: 30px;margin-bottom: 2em;<html> the root element's font sizemargin-bottom: 10%;
The percentage is based on the width of the container.#margin-left
默认属性 margin-left: 0;margin-left: 50px;margin-left: 7em;<html> the root element's font sizemargin-left: 30%;
The percentage is based on the width of the container.margin-left: auto;margin-right: auto, it will center the element, if a fixed width is defined.#margin-right
默认属性 margin-right: 0;margin-right: 50px;margin-right: 7em;<html> the root element's font sizemargin-right: 30%;
The percentage is based on the width of the container.margin-right: auto;margin-left: auto, it will center the element, if a fixed width is defined.#margin-top
默认属性 margin-top: 0;margin-top: 30px;margin-top: 2em;<html> the root element's font sizemargin-top: 10%;
The percentage is based on the width of the container.#margin
margin-top margin-right margin-bottom and margin-left.默认属性 margin: 0;margin: 30px;margin: 30px 60px;margin: 30px 60px 45px;margin: 30px 60px 45px 85px;#max-height
默认属性 max-height: none;max-height: 2000px;max-height: 100px;overflow property.#max-width
默认属性 max-width: none;max-width: 2000px;max-width: 150px;#min-height
默认属性 min-height: 0;min-height: 200px;min-height: 5px;#min-width
默认属性 min-width: 0;min-width: 300px;min-width: 5px;#padding-bottom
默认属性 padding-bottom: 0;padding-bottom: 50px;padding-bottom: 7em;<html> the root element's font sizepadding-bottom: 30%;
The percentage is based on the width of the element.#padding-left
默认属性 padding-left: 0;padding-left: 50px;padding-left: 7em;<html> the root element's font sizepadding-left: 30%;
The percentage is based on the width of the element.#padding-right
默认属性 padding-right: 0;padding-right: 50px;padding-right: 7em;<html> the root element's font sizepadding-right: 30%;
The percentage is based on the width of the element.#padding-top
默认属性 padding-top: 0;padding-top: 50px;padding-top: 7em;<html> the root element's font sizepadding-top: 30%;
The percentage is based on the width of the element.#padding
padding-top padding-right padding-bottom and padding-left.默认属性 padding: 0;padding: 30px;padding: 30px 60px;padding: 30px 60px 45px;padding: 30px 60px 45px 85px;#width
默认属性 width: auto;width: 240px;width: 50%;#align-content
flex-wrap: wrap is present, and if there are multiple lines of flexbox items.default align-content: stretch;300px high. All boxes are 50px high, apart from the second one who is 100px high.align-content: flex-start;align-content: flex-end;align-content: center;align-content: space-between;align-content: space-around;#align-items
align-items: flex-start;align-items: flex-end;align-items: center;align-items: baseline;align-items: stretch;#align-self
align-items, but applies only to a single flexbox item, instead of all of them.default align-self: auto;align-items.align-self: flex-start;align-items: center and the target has align-self: flex-start, only the target will be at the start of the cross axis.align-self: flex-end;align-items: center and the target has align-self: flex-end, only the target will be at the end of the cross axis.align-self: center;align-items: flex-start and the target has align-self: center, only the target will be at the center of the cross axis.align-self: baseline;align-items: center and the target has align-self: baseline, only the target will be at the baseline of the cross axis.align-self: stretch;align-items: center and the target has align-self: stretch, only the target will stretch along the whole cross axis.#flex-basis
default flex-basis: auto;height or width value if they are defined.flex-basis: 80px;#flex-direction
default flex-direction: row;flex-direction: row-reverse;flex-direction: column;flex-direction: column-reverse;#flex-flow
flex-direction and flex-wrap.#flex-grow
default flex-grow: 0;flex-grow: 1;flex-grow value.flex-grow: 2;#flex-shrink
default flex-shrink: 1;flex-shrink: 0;flex-shrink: 2;#flex-wrap
default flex-wrap: nowrap;flex-wrap: wrap;flex-wrap: wrap-reverse;#justify-content
default justify-content: flex-start;justify-content: flex-end;justify-content: center;justify-content: space-between;justify-content: space-around;#order
default order: 0;order: 1;order: -1;order: 9;#align-content
+ flex-wrap: wrap 后有效,且 flexbox 的子元素有多行。默认属性 align-content: stretch;300px。 所有的方块高 50px,除了第二个的高度为 100px。
+
+
+
+ align-content: flex-start;align-content: flex-end;align-content: center;align-content: space-between;align-content: space-around;#align-items
+ align-items: flex-start;align-items: flex-end;align-items: center;align-items: baseline;align-items: stretch;
+ #align-self
+
+ align-items,但是仅仅作用于一个 flexbox 元素,而不是作用于所有的元素默认属性
+
+
+ align-self: auto;
+ align-items 的值。align-self: flex-start;
+ align-items: center 且 目标元素 有属性 align-self: flex-start,那么仅仅目标元素对齐于纵向轴的起始处。align-self: flex-end;
+ align-items: center 且 目标元素 有属性 align-self: flex-end,那么仅仅目标元素对齐于纵向轴的末尾处。align-self: center;
+ align-items: flex-start 且 目标元素 有属性 align-self: center,那么仅仅目标元素对齐于纵向轴的中间。align-self: baseline;
+ align-items: center 且 目标元素 有属性 align-self: baseline,那么仅仅目标元素对齐于纵向轴的 baseline。align-self: stretch;
+ align-items: center 且 目标元素 有属性 align-self: stretch,那么仅仅目标元素拉伸填充于整个纵向轴。
+ #flex-basis
+
+ 默认属性
+
+
+ flex-basis: auto;
+ 高度 或 宽度 调整大小。flex-basis: 80px;
+
+ #flex-direction
+
+ 默认属性
+
+
+ flex-direction: row;
+ flex-direction: row-reverse;
+ flex-direction: column;
+ flex-direction: column-reverse;
+
+ #flex-flow
+
+ flex-direction 和 flex-wrap 的缩写形式。
+ #flex-grow
+
+ 默认属性
+
+
+ flex-grow: 0;
+ flex-grow: 1;
+ flex-grow 的话,它将占用剩下的所有空间。flex-grow: 2;
+
+
+ #flex-shrink
+
+ 默认属性
+
+
+ flex-shrink: 1;
+ flex-shrink: 0;
+ flex-shrink: 2;
+
+
+ #flex-wrap
+
+ 默认属性
+
+
+ flex-wrap: nowrap;
+ flex-wrap: wrap;
+ flex-wrap: wrap-reverse;
+
+ #justify-content
+
+ 默认属性
+
+
+ justify-content: flex-start;
+ justify-content: flex-end;
+ justify-content: center;
+ justify-content: space-between;
+ justify-content: space-around;
+
+ #order
+
+ 默认属性
+
+
+ order: 0;
+ order: 1;
+ order: -1;
+ order: 9;
+ #bottom
default bottom: auto;bottom: 20px;bottom: 0;#left
default left: auto;left: 80px;left: -20px;#position
default position: static;topbottomleftrightz-indexposition: relative;topbottomleftrightz-indexposition: absolute;topbottomleftrightz-indexposition: fixed;topbottomleftrightz-index#right
default right: auto;right: 80px;right: -20px;#top
default top: auto;top: 20px;top: 0;#z-index
static).default z-index: auto;z-index: 1;z-index: -1;#bottom
默认属性 bottom: auto;bottom: 20px;bottom: 0;#left
默认属性 left: auto;left: 80px;left: -20px;#position
默认属性 position: static;topbottomleftrightz-indexposition: relative;topbottomleftrightz-indexposition: absolute;topbottomleftrightz-indexposition: fixed;topbottomleftrightz-index#right
默认属性 right: auto;right: 80px;right: -20px;#top
默认属性 top: auto;top: 20px;top: 0;#z-index
static).默认属性 z-index: auto;z-index: 1;z-index: -1;#transition-delay
default transition-delay: 0s;transition-delay: 1.2s;s.transition-delay: 2400ms;ms.transition-delay: -500ms;500ms.#transition-duration
default transition-duration: 0s;transition-duration: 1.2s;s.transition-duration: 2400ms;ms.#transition-property
default transition-property: all;transition-property: none;transition-property: background;transition-property: color;transition-property: transform;#transition-timing-function
default transition-timing-function: ease;transition-timing-function: ease-in;transition-timing-function: ease-out;transition-timing-function: ease-in-out;ease, but more pronounced.transition-timing-function: linear;transition-timing-function: step-start;transition-timing-function: step-end;transition-timing-function: steps(4, end);steps() with an integer, you can define a specific number of steps before reaching the end. The state of the element will not vary gradually, but rather jump from state to state in separate instants.#transition
transition-property transition-duration transition-timing-function and transition-delay.transition-duration is required.transition: 1s;transition-duration is set to 1stransition-property defaults to alltransition-timing-function defaults to easetransition-delay defaults to 0stransition: 1s linear;transition-duration is set to 1stransition-property defaults to alltransition-timing-function is set to lineartransition-delay defaults to 0stransition: background 1s linear;transition-duration is set to 1stransition-property is set to backgroundtransition-timing-function is set to lineartransition-delay defaults to 0stransition: background 1s linear 500ms;transition-duration is set to 1stransition-property is set to backgroundtransition-timing-function is set to lineartransition-delay is set to 500mstransition: background 4s, transform 1s;#transition-delay
默认属性 transition-delay: 0s;transition-delay: 1.2s;s.transition-delay: 2400ms;ms.transition-delay: -500ms;500ms.#transition-duration
默认属性 transition-duration: 0s;transition-duration: 1.2s;s.transition-duration: 2400ms;ms.#transition-property
默认属性 transition-property: all;transition-property: none;transition-property: background;transition-property: color;transition-property: transform;#transition-timing-function
默认属性 transition-timing-function: ease;transition-timing-function: ease-in;transition-timing-function: ease-out;transition-timing-function: ease-in-out;ease, but more pronounced.transition-timing-function: linear;transition-timing-function: step-start;transition-timing-function: step-end;transition-timing-function: steps(4, end);steps() with an integer, you can define a specific number of steps before reaching the end. The state of the element will not vary gradually, but rather jump from state to state in separate instants.#transition
transition-property transition-duration transition-timing-function and transition-delay.transition-duration is required.transition: 1s;transition-duration is set to 1stransition-property defaults to alltransition-timing-function defaults to easetransition-delay defaults to 0stransition: 1s linear;transition-duration is set to 1stransition-property defaults to alltransition-timing-function is set to lineartransition-delay defaults to 0stransition: background 1s linear;transition-duration is set to 1stransition-property is set to backgroundtransition-timing-function is set to lineartransition-delay defaults to 0stransition: background 1s linear 500ms;transition-duration is set to 1stransition-property is set to backgroundtransition-timing-function is set to lineartransition-delay is set to 500mstransition: background 4s, transform 1s;#color
color: transparent;color: red;color: #05ffb0;color: rgb(50, 115, 220);redgreenbluecolor: rgba(0, 0, 0, 0.5);rgbalpha channel and defines the opacity of the colorcolor: hsl(14, 100%, 53%);hue and can go from 0 to 359saturation and go from 0% to 100%luminosity and go from 0% to 100%color: hsla(14, 100%, 53%, 0.6);hslalpha channel and defines the opacity of the color#font-family
font-family: "Source Sans Pro", "Arial", sans-serif;font-family list of font families defines the priority in which the browser should choose the font family.Source Sans Pro if it's available. If it can't find it, it will try to use Arial. If it's not available either, it will use the browser's sans-serif font.font-family: serif;font-family: sans-serif;font-family: monospace;font-family: cursive;font-family: fantasy;#font-size
default font-size: medium;font-size: 20px;font-size: 1.2em;font-size.
As a result, the value will cascade if used on child elements.font-size: 1.2rem;font-size, which is the <html> element.
As a result, the value will not vary depending on the depth of the element in the HTML hierarchy, and will reamin context independent.font-size: 90%;font-size.
As a result, the value will cascade if used on child elements.font-size: smaller;largersmallerfont-size: x-large;<html>.xx-smallx-smallsmallmediumlargex-largexx-large#font-style
default font-style: normal;font-style: italic;font-style: oblique;#font-variant
default font-variant: normal;font-variant: small-caps;#font-weight
default font-weight: normal;font-weight: bold;font-weight: 600;font-weight: lighter;lighter or bolder. The browser will use the next available weight.#font
font-style font-variant font-weight font-size line-height and font-family.#letter-spacing
default letter-spacing: normal;letter-spacing: 2px;letter-spacing: 0.1em;#line-height
default line-height: normal;recommended line-height: 1.6;line-height: 30px;line-height: 0.8em;#text-align
text-align: left;text-align: right;text-align: center;text-align: justify;#text-decoration
default text-decoration: none;text-decoration: underline;#text-indent
default text-indent: 0;text-indent: 40px;text-indent: -2em;#text-overflow
default text-overflow: clip;text-overflow: ellipsis;…#text-shadow
default text-shadow: none;text-shadow: 2px 6px;text-shadow: 2px 6px red;color, you can use color names, hexadecimal, rgb, hsl...text-shadow: 2px 4px 10px red;#text-transform
default text-transform: none;text-transform: capitalize;text-transform: uppercase;text-transform: lowercase;#white-space
default white-space: normal;
Line breaks are ignored.
The text content is wrapped.white-space: nowrap;
Line breaks are ignored.
The text content is not wrapped and remains on a single line.white-space: pre;<br>white-space: pre-wrap;<br>, but also when reaching the end of the elementwhite-space: pre-line;<br>, but also when reaching the end of the element#word-break
default word-break: normal;word-break: break-all;#word-spacing
default word-spacing: normal;word-spacing: 5px;word-spacing: 2em;#color
color: transparent;color: red;color: #05ffb0;color: rgb(50, 115, 220);redgreenbluecolor: rgba(0, 0, 0, 0.5);rgbalpha channel and defines the opacity of the colorcolor: hsl(14, 100%, 53%);hue and can go from 0 to 359saturation and go from 0% to 100%luminosity and go from 0% to 100%color: hsla(14, 100%, 53%, 0.6);hslalpha channel and defines the opacity of the color#font-family
font-family: "Source Sans Pro", "Arial", sans-serif;font-family list of font families defines the priority in which the browser should choose the font family.Source Sans Pro if it's available. If it can't find it, it will try to use Arial. If it's not available either, it will use the browser's sans-serif font.font-family: serif;font-family: sans-serif;font-family: monospace;font-family: cursive;font-family: fantasy;#font-size
默认属性 font-size: medium;font-size: 20px;font-size: 1.2em;font-size.
As a result, the value will cascade if used on child elements.font-size: 1.2rem;font-size, which is the <html> element.
As a result, the value will not vary depending on the depth of the element in the HTML hierarchy, and will reamin context independent.font-size: 90%;font-size.
As a result, the value will cascade if used on child elements.font-size: smaller;largersmallerfont-size: x-large;<html>.xx-smallx-smallsmallmediumlargex-largexx-large#font-style
默认属性 font-style: normal;font-style: italic;font-style: oblique;#font-variant
默认属性 font-variant: normal;font-variant: small-caps;#font-weight
默认属性 font-weight: normal;font-weight: bold;font-weight: 600;font-weight: lighter;lighter or bolder. The browser will use the next available weight.#font
font-style font-variant font-weight font-size line-height and font-family.#letter-spacing
默认属性 letter-spacing: normal;letter-spacing: 2px;letter-spacing: 0.1em;#line-height
默认属性 line-height: normal;recommended line-height: 1.6;line-height: 30px;line-height: 0.8em;#text-align
text-align: left;text-align: right;text-align: center;text-align: justify;#text-decoration
默认属性 text-decoration: none;text-decoration: underline;#text-indent
默认属性 text-indent: 0;text-indent: 40px;text-indent: -2em;#text-overflow
默认属性 text-overflow: clip;text-overflow: ellipsis;…#text-shadow
默认属性 text-shadow: none;text-shadow: 2px 6px;text-shadow: 2px 6px red;color, you can use color names, hexadecimal, rgb, hsl...text-shadow: 2px 4px 10px red;#text-transform
默认属性 text-transform: none;text-transform: capitalize;text-transform: uppercase;text-transform: lowercase;#white-space
默认属性 white-space: normal;
Line breaks are ignored.
The text content is wrapped.white-space: nowrap;
Line breaks are ignored.
The text content is not wrapped and remains on a single line.white-space: pre;<br>white-space: pre-wrap;<br>, but also when reaching the end of the elementwhite-space: pre-line;<br>, but also when reaching the end of the element#word-break
默认属性 word-break: normal;word-break: break-all;#word-spacing
默认属性 word-spacing: normal;word-spacing: 5px;word-spacing: 2em;