├── CNAME ├── images ├── jt.png ├── landscape.jpg ├── landscape.png ├── hugging-face.png ├── list-style-image.png ├── css-reference-icon.png ├── css-reference-logo.png ├── css-reference-share.png ├── css-reference-title.png ├── css-reference-type.png └── css-reference-share-dark.png ├── javascript ├── single.js ├── index.js └── collection.js ├── favicons ├── favicon.ico ├── favicon-16x16.png ├── favicon-32x32.png ├── mstile-150x150.png ├── apple-touch-icon.png ├── android-chrome-192x192.png ├── android-chrome-256x256.png ├── browserconfig.xml └── manifest.json ├── flexbox.html ├── animations.html ├── positioning.html ├── box-model.html ├── typography.html ├── backgrounds.html ├── transitions.html ├── .gitignore ├── _includes ├── noscript.html ├── google-fonts.html ├── favicons.html ├── svg │ ├── facebook.html │ ├── twitter.html │ └── github.html ├── modals │ └── share.html └── collections │ ├── positioning-list.html │ ├── transitions-list.html │ ├── backgrounds-list.html │ ├── animations-list.html │ ├── flexbox-list.html │ └── typography-list.html ├── _config.yml ├── _config.local.yml ├── sass ├── mixins.sass ├── keyframes.sass ├── tooltip.sass ├── functions.sass ├── list.sass ├── minireset.sass ├── base.sass ├── heading.sass ├── header.sass ├── variables.sass ├── modal.sass ├── footer.sass ├── elements.sass ├── controls.sass ├── property.sass └── example.sass ├── README.md ├── css └── website.sass ├── package.json ├── LICENSE ├── property ├── flex-flow │ └── index.html ├── list-style │ └── index.html ├── font │ └── index.html ├── background │ └── index.html ├── animation │ └── index.html ├── outline-width │ └── index.html ├── border-width │ └── index.html ├── text-decoration │ └── index.html ├── font-variant │ └── index.html ├── border-top-width │ └── index.html ├── overflow-wrap │ └── index.html ├── border-left-width │ └── index.html ├── border │ └── index.html ├── border-right-width │ └── index.html ├── outline │ └── index.html ├── border-bottom-width │ └── index.html ├── column-count │ └── index.html ├── word-break │ └── index.html ├── flex-basis │ └── index.html ├── border-top │ └── index.html ├── border-left │ └── index.html ├── border-right │ └── index.html ├── border-bottom │ └── index.html ├── column-gap │ └── index.html ├── column-width │ └── index.html ├── text-overflow │ └── index.html ├── list-style-image │ └── index.html ├── opacity │ └── index.html ├── background-attachment │ └── index.html ├── pointer-events │ └── index.html ├── font-style │ └── index.html ├── word-spacing │ └── index.html ├── letter-spacing │ └── index.html ├── height │ └── index.html ├── min-width │ └── index.html ├── border-top-color │ └── index.html ├── border-left-color │ └── index.html ├── border-right-color │ └── index.html ├── background-clip │ └── index.html ├── border-bottom-color │ └── index.html ├── border-collapse │ └── index.html ├── list-style-position │ └── index.html ├── background-origin │ └── index.html ├── background-position │ └── index.html └── animation-play-state │ └── index.html ├── _layouts ├── single.html └── collection.html └── index.html /CNAME: -------------------------------------------------------------------------------- 1 | cssreference.parryqiu.com -------------------------------------------------------------------------------- /images/jt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/jt.png -------------------------------------------------------------------------------- /javascript/single.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | }); 3 | -------------------------------------------------------------------------------- /favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/favicon.ico -------------------------------------------------------------------------------- /images/landscape.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/landscape.jpg -------------------------------------------------------------------------------- /images/landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/landscape.png -------------------------------------------------------------------------------- /images/hugging-face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/hugging-face.png -------------------------------------------------------------------------------- /favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /favicons/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/mstile-150x150.png -------------------------------------------------------------------------------- /images/list-style-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/list-style-image.png -------------------------------------------------------------------------------- /favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /images/css-reference-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/css-reference-icon.png -------------------------------------------------------------------------------- /images/css-reference-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/css-reference-logo.png -------------------------------------------------------------------------------- /images/css-reference-share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/css-reference-share.png -------------------------------------------------------------------------------- /images/css-reference-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/css-reference-title.png -------------------------------------------------------------------------------- /images/css-reference-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/css-reference-type.png -------------------------------------------------------------------------------- /favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /favicons/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/favicons/android-chrome-256x256.png -------------------------------------------------------------------------------- /images/css-reference-share-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ParryQiu/css-reference/HEAD/images/css-reference-share-dark.png -------------------------------------------------------------------------------- /flexbox.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Flexbox" 4 | menu_list: "flexbox-list" 5 | description: "使用的 CSS3 Flexbox 特性" 6 | --- 7 | 8 | {% include collections/flexbox.html %} 9 | -------------------------------------------------------------------------------- /animations.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Animations" 4 | menu_list: "animations-list" 5 | description: "animate almost any other property" 6 | --- 7 | 8 | {% include collections/animations.html %} 9 | -------------------------------------------------------------------------------- /positioning.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Positioning" 4 | menu_list: "positioning-list" 5 | description: "position elements manually in HTML" 6 | --- 7 | 8 | {% include collections/positioning.html %} 9 | -------------------------------------------------------------------------------- /box-model.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Box model" 4 | menu_list: "box-model-list" 5 | description: "define the size and behavior of the HTML element" 6 | --- 7 | 8 | {% include collections/box-model.html %} 9 | -------------------------------------------------------------------------------- /typography.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Typography" 4 | menu_list: "typography-list" 5 | description: "define the color, size, spacing, and shape of text" 6 | --- 7 | 8 | {% include collections/typography.html %} 9 | -------------------------------------------------------------------------------- /backgrounds.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Backgrounds" 4 | menu_list: "backgrounds-list" 5 | description: "style the background of an element with colors and images" 6 | --- 7 | 8 | {% include collections/backgrounds.html %} 9 | -------------------------------------------------------------------------------- /transitions.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: collection 3 | collection_name: "Transitions" 4 | menu_list: "transitions-list" 5 | description: "define how an HTML element transitions between states" 6 | --- 7 | 8 | {% include collections/transitions.html %} 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files 2 | 3 | .config.local.yml 4 | .DS_Store 5 | .jekyll-metadata 6 | .ruby-version 7 | npm-debug.log 8 | test.sass 9 | 10 | # Folders 11 | 12 | .idea/ 13 | .sass-cache 14 | _gh_pages 15 | _site 16 | images/trash 17 | node_modules 18 | -------------------------------------------------------------------------------- /_includes/noscript.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /favicons/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #05ffb0 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /_includes/google-fonts.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /javascript/index.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | // Logo 3 | var $logo = document.getElementById('logo'); 4 | 5 | $logo.addEventListener('click', function(event) { 6 | event.preventDefault(); 7 | history.replaceState('', document.title, ' '); 8 | window.scrollTo(0,0); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | title: CSS Reference | 免费的 CSS 属性可视化文档 2 | subtitle: "免费的 CSS 属性可视化文档" 3 | description: "cssreference.parryqiu.com 是一个免费的 CSS 可视化文档。文档使用了大量的可视化图形以及动画对属性进行了解释。" 4 | share: "CSS Reference: a free visual guide to the most popular CSS properties." 5 | url: http://cssreference.parryqiu.com 6 | markdown: kramdown 7 | permalink: pretty 8 | exclude: ['node_modules'] 9 | -------------------------------------------------------------------------------- /_config.local.yml: -------------------------------------------------------------------------------- 1 | title: CSS Reference 2 | subtitle: "免费的 CSS 属性可视化文档" 3 | description: "CSS Reference is a free visual guide to CSS. It features the most popular properties, and explains them with illustrated and animated examples." 4 | share: "CSS Reference: a free visual guide to the most popular CSS properties." 5 | url: http://localhost:4000 6 | markdown: kramdown 7 | permalink: pretty 8 | exclude: ['node_modules'] 9 | -------------------------------------------------------------------------------- /favicons/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CSS Reference", 3 | "icons": [ 4 | { 5 | "src": "\/favicons\/android-chrome-192x192.png?v=201611221819", 6 | "sizes": "192x192", 7 | "type": "image\/png" 8 | }, 9 | { 10 | "src": "\/favicons\/android-chrome-256x256.png?v=201611221819", 11 | "sizes": "256x256", 12 | "type": "image\/png" 13 | } 14 | ], 15 | "theme_color": "#05ffb0", 16 | "display": "standalone" 17 | } 18 | -------------------------------------------------------------------------------- /javascript/collection.js: -------------------------------------------------------------------------------- 1 | document.addEventListener('DOMContentLoaded', function() { 2 | // Hashes 3 | var $hashes = document.querySelectorAll('.hash, .menu-list-ul li a'); 4 | 5 | Array.prototype.forEach.call($hashes, function($el) { 6 | $el.addEventListener('click', function(event) { 7 | event.preventDefault(); 8 | var propertyName = $el.dataset.propertyName; 9 | var $target = document.getElementById($el.dataset.propertyName); 10 | history.replaceState('', document.title, '#' + propertyName); 11 | 12 | if ($target) { 13 | $target.scrollIntoView(); 14 | } 15 | }); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /sass/mixins.sass: -------------------------------------------------------------------------------- 1 | =center 2 | align-items: center 3 | display: flex 4 | justify-content: center 5 | text-align: center 6 | 7 | =clearfix 8 | &:after 9 | clear: both 10 | content: " " 11 | display: table 12 | 13 | =overlay($offset: 0) 14 | bottom: $offset 15 | left: $offset 16 | position: absolute 17 | right: $offset 18 | top: $offset 19 | 20 | =mobile 21 | @media (max-width: 799px) 22 | @content 23 | 24 | =desktop 25 | @media (min-width: 800px) 26 | @content 27 | 28 | =until($bp) 29 | @media (max-width: $bp) 30 | @content 31 | 32 | =from($bp) 33 | @media (min-width: $bp) 34 | @content 35 | -------------------------------------------------------------------------------- /sass/keyframes.sass: -------------------------------------------------------------------------------- 1 | @keyframes fadeIn 2 | from 3 | opacity: 0 4 | to 5 | opacity: 1 6 | 7 | @keyframes fadeAndMove 8 | from 9 | opacity: 0 10 | transform: translateX(0) 11 | to 12 | opacity: 1 13 | transform: translateX(200px) 14 | 15 | @keyframes moveRight 16 | from 17 | transform: translateX(0) 18 | to 19 | transform: translateX(200px) 20 | 21 | @keyframes rotateFull 22 | from 23 | transform: rotate(0deg) 24 | to 25 | transform: rotate(359deg) 26 | 27 | @keyframes kf-animation-fill-mode 28 | from 29 | background: $green 30 | transform: translateX(0) 31 | to 32 | background: $blue 33 | transform: translateX(200px) 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Translated into Chinese: [http://cssreference.parryqiu.com/](http://cssreference.parryqiu.com/) 2 | 3 | # [CSS Reference](http://cssreference.parryqiu.com): a free visual guide to the most popular CSS properties 4 | 5 | [![CSS Reference screenshot](https://raw.github.com/jgthms/css-reference/master/images/css-reference-share.png)](http://cssreference.parryqiu.com) 6 | 7 | # License 8 | 9 | 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/). 10 | 11 | The underlying source code used to format and display that content is licensed under the [MIT license](http://opensource.org/licenses/mit-license.php). 12 | -------------------------------------------------------------------------------- /css/website.sass: -------------------------------------------------------------------------------- 1 | @charset "utf-8" 2 | 3 | @import "../sass/minireset" 4 | @import "../sass/functions" 5 | @import "../sass/variables" 6 | @import "../sass/mixins" 7 | @import "../sass/tooltip" 8 | 9 | @import "../sass/base" 10 | @import "../sass/controls" 11 | @import "../sass/menu" 12 | @import "../sass/header" 13 | @import "../sass/footer" 14 | @import "../sass/heading" 15 | @import "../sass/list" 16 | @import "../sass/property" 17 | @import "../sass/example" 18 | @import "../sass/modal" 19 | @import "../sass/keyframes" 20 | 21 | @import "../sass/elements" 22 | 23 | .modal 24 | z-index: 50 25 | 26 | .menu 27 | z-index: 40 28 | 29 | .footer 30 | z-index: 30 31 | 32 | .properties, 33 | .list 34 | z-index: 20 35 | 36 | .header 37 | z-index: 10 38 | -------------------------------------------------------------------------------- /_includes/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /_includes/svg/facebook.html: -------------------------------------------------------------------------------- 1 | 4 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /sass/tooltip.sass: -------------------------------------------------------------------------------- 1 | [data-tooltip] 2 | position: relative 3 | 4 | [data-tooltip]:before 5 | background-color: $text-strong 6 | border-radius: 2px 7 | bottom: 100% 8 | color: #fff 9 | content: attr(data-tooltip) 10 | font-family: $family-primary 11 | font-size: 0.6rem 12 | left: 50% 13 | line-height: 1.2 14 | opacity: 0 15 | padding: 0.5em 0.6em 16 | pointer-events: none 17 | position: absolute 18 | text-align: center 19 | transform: translateX(-50%) translateY(0) 20 | transition-duration: $speed 21 | transition-property: opacity, transform 22 | visibility: hidden 23 | white-space: nowrap 24 | 25 | [data-tooltip]:hover:before 26 | opacity: 1 27 | transform: translateX(-50%) translateY(-4px) 28 | visibility: visible 29 | 30 | [data-tooltip].is-copied:before 31 | background: $green 32 | content: "已复制!" 33 | -------------------------------------------------------------------------------- /_includes/modals/share.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css-reference", 3 | "version": "1.0.0", 4 | "description": "A visual guide to the most popular CSS properties.", 5 | "main": "css/website.sass", 6 | "scripts": { 7 | "build": "npm run build-clean && npm run build-sass && npm run build-autoprefix", 8 | "build-autoprefix": "postcss --use autoprefixer --output css/website.css css/website.css", 9 | "build-clean": "rm css/website.css", 10 | "build-sass": "node-sass --output-style compressed css/website.sass css/website.css", 11 | "develop": "node-sass css/website.sass css/website.css", 12 | "start": "npm run develop -- --watch" 13 | }, 14 | "keywords": [ 15 | "css", 16 | "sass", 17 | "jekyll" 18 | ], 19 | "author": "Jeremy Thomas (http://jgthms.com)", 20 | "license": "ISC", 21 | "devDependencies": { 22 | "autoprefixer": "^6.5.3", 23 | "node-sass": "^3.11.3", 24 | "postcss-cli": "^2.6.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sass/functions.sass: -------------------------------------------------------------------------------- 1 | @function powerNumber($number, $exp) 2 | $value: 1 3 | @if $exp > 0 4 | @for $i from 1 through $exp 5 | $value: $value * $number 6 | @else if $exp < 0 7 | @for $i from 1 through -$exp 8 | $value: $value / $number 9 | @return $value 10 | 11 | @function colorLuminance($color) 12 | $color-rgb: ('red': red($color),'green': green($color),'blue': blue($color)) 13 | @each $name, $value in $color-rgb 14 | $adjusted: 0 15 | $value: $value / 255 16 | @if $value < 0.03928 17 | $value: $value / 12.92 18 | @else 19 | $value: ($value + .055) / 1.055 20 | $value: powerNumber($value, 2) 21 | $color-rgb: map-merge($color-rgb, ($name: $value)) 22 | @return (map-get($color-rgb, 'red') * .2126) + (map-get($color-rgb, 'green') * .7152) + (map-get($color-rgb, 'blue') * .0722) 23 | 24 | @function findColorInvert($color) 25 | @if (colorLuminance($color) > 0.55) 26 | @return rgba(#000, 0.7) 27 | @else 28 | @return #fff 29 | -------------------------------------------------------------------------------- /sass/list.sass: -------------------------------------------------------------------------------- 1 | .list 2 | padding-bottom: 3rem 3 | position: relative 4 | .menu-search input 5 | font-size: 1rem 6 | 7 | .list-list 8 | &.is-searching 9 | .menu-item 10 | display: none 11 | &.is-highlighted, 12 | &.is-selected, 13 | display: flex 14 | 15 | .list-item 16 | border-top: 1px solid $primary 17 | display: flex 18 | position: relative 19 | 20 | .list-name 21 | display: block 22 | padding: 1rem 23 | transition: none 24 | 25 | .list-collections 26 | bottom: 0 27 | color: rgba(#000, 0.3) 28 | display: none 29 | font-size: 0.8em 30 | justify-content: flex-end 31 | position: absolute 32 | right: 0 33 | top: 0 34 | a:hover 35 | text-decoration: underline 36 | strong 37 | color: inherit 38 | text-transform: capitalize 39 | 40 | +desktop 41 | .list-name, 42 | .list-collections 43 | align-items: center 44 | display: flex 45 | padding: 1rem 46 | .list-name 47 | flex-grow: 1 48 | flex-shrink: 1 49 | .list-item 50 | align-items: stretch 51 | justify-content: flex-start 52 | -------------------------------------------------------------------------------- /_includes/collections/positioning-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jeremy Thomas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /sass/minireset.sass: -------------------------------------------------------------------------------- 1 | /*! minireset.css v0.0.2 | MIT License | github.com/jgthms/minireset.css */ 2 | // Blocks 3 | html, 4 | body, 5 | p, 6 | ol, 7 | ul, 8 | li, 9 | dl, 10 | dt, 11 | dd, 12 | blockquote, 13 | figure, 14 | fieldset, 15 | legend, 16 | textarea, 17 | pre, 18 | iframe, 19 | hr, 20 | h1, 21 | h2, 22 | h3, 23 | h4, 24 | h5, 25 | h6 26 | margin: 0 27 | padding: 0 28 | 29 | // Headings 30 | h1, 31 | h2, 32 | h3, 33 | h4, 34 | h5, 35 | h6 36 | font-size: 100% 37 | font-weight: normal 38 | 39 | // List 40 | ul 41 | list-style: none 42 | 43 | // Form 44 | button, 45 | input, 46 | select, 47 | textarea 48 | color: inherit 49 | font-family: inherit 50 | margin: 0 51 | 52 | // Box sizing 53 | html 54 | box-sizing: border-box 55 | 56 | * 57 | box-sizing: inherit 58 | &:before, 59 | &:after 60 | box-sizing: inherit 61 | 62 | // Media 63 | img, 64 | embed, 65 | object, 66 | audio, 67 | video 68 | height: auto 69 | max-width: 100% 70 | 71 | // Iframe 72 | iframe 73 | border: 0 74 | 75 | // Table 76 | table 77 | border-collapse: collapse 78 | border-spacing: 0 79 | 80 | td, 81 | th 82 | padding: 0 83 | text-align: left 84 | -------------------------------------------------------------------------------- /_includes/collections/transitions-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_includes/svg/twitter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /sass/base.sass: -------------------------------------------------------------------------------- 1 | html 2 | background: #fff 3 | font-size: 16px 4 | -moz-osx-font-smoothing: grayscale 5 | -webkit-font-smoothing: antialiased 6 | max-width: 100vw 7 | min-width: 300px 8 | overflow-x: hidden 9 | text-rendering: optimizeLegibility 10 | 11 | body 12 | color: $text 13 | font-family: $family-primary 14 | font-size: 1rem 15 | line-height: 1.6 16 | 17 | a, 18 | button, 19 | input, 20 | textarea 21 | outline: none 22 | 23 | a 24 | color: $link 25 | cursor: pointer 26 | text-decoration: none 27 | transition-duration: $speed 28 | transition-property: background, border-bottom-color, color 29 | 30 | code 31 | font-family: $family-monospace 32 | font-size: 0.8em 33 | 34 | img 35 | max-height: 100% 36 | max-width: 100% 37 | 38 | strong 39 | color: $text-strong 40 | 41 | em 42 | padding-left: 3px 43 | padding-right: 5px 44 | 45 | pre 46 | white-space: pre 47 | word-wrap: normal 48 | code 49 | font-size: 1em 50 | padding: 0 51 | 52 | textarea 53 | max-height: 100% 54 | max-width: 100% 55 | 56 | html 57 | \::-moz-selection 58 | background: $primary 59 | color: $primary-invert 60 | \::selection 61 | background: $primary 62 | color: $primary-invert 63 | 64 | +desktop 65 | html 66 | font-size: 18px 67 | padding-left: $menu-width 68 | -------------------------------------------------------------------------------- /property/flex-flow/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: flex-flow 4 | --- 5 | 6 |
7 |
8 | 10 |

11 | #flex-flow 12 |

13 |
14 |

flex-directionflex-wrap 的缩写形式。

15 | 16 |
17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | -------------------------------------------------------------------------------- /_includes/svg/github.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /property/list-style/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: list-style 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #list-style 15 |

16 |
17 |

Shorthand property for list-style-type list-style-image and list-style-position.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | -------------------------------------------------------------------------------- /sass/heading.sass: -------------------------------------------------------------------------------- 1 | .heading 2 | background: $plum 3 | color: $plum-light 4 | padding: 4rem 3rem 5 | 6 | .heading-title 7 | font-size: 2rem 8 | line-height: 1.2 9 | strong 10 | color: $plum-invert 11 | font-weight: $weight-bold 12 | 13 | .heading-share 14 | align-items: center 15 | position: relative 16 | 17 | .heading-share-label 18 | color: $plum-light 19 | font-size: 0.8em 20 | margin-right: 0.5rem 21 | 22 | .heading-share-button 23 | align-items: center 24 | display: inline-flex 25 | height: 3rem 26 | justify-content: center 27 | position: relative 28 | width: 3rem 29 | &:before 30 | +overlay 31 | background: $plum-dark 32 | border-radius: 5px 33 | content: "" 34 | display: block 35 | height: 100% 36 | opacity: 0 37 | transform: scale(1.2) 38 | transform-origin: center center 39 | transition-duration: $speed 40 | transition-property: opacity, transform 41 | width: 100% 42 | svg 43 | height: 1.5rem 44 | position: relative 45 | width: 1.5rem 46 | &:hover:before 47 | opacity: 1 48 | transform: scale(1) 49 | 50 | +mobile 51 | .heading-share 52 | margin-top: 2rem 53 | 54 | +until(1199px) 55 | .heading-share 56 | min-width: 8rem 57 | text-align: center 58 | .heading-share-label 59 | display: block 60 | margin-bottom: 0.5rem 61 | .heading-share-button 62 | vertical-align: top 63 | 64 | +desktop 65 | .heading 66 | align-items: center 67 | display: flex 68 | .heading-content 69 | flex-grow: 1 70 | flex-shrink: 1 71 | 72 | +from(1200px) 73 | .heading-share 74 | display: flex 75 | .heading-share-label 76 | margin-right: 0.5rem 77 | .heading-share-button 78 | display: flex 79 | -------------------------------------------------------------------------------- /property/font/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: font 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #font 18 |

19 |
20 |

Shorthand property for font-style font-variant font-weight font-size line-height and font-family.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /_layouts/single.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{page.property_name}} - {{site.title}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {% include favicons.html %} 28 | 29 | 30 | {% include menu.html %} 31 |
32 |
33 | {{content}} 34 |
35 |
36 | {% include modals/share.html %} 37 | {% include google-fonts.html %} 38 | 39 | 40 | {% include noscript.html %} 41 | 42 | 43 | -------------------------------------------------------------------------------- /_includes/collections/backgrounds-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sass/header.sass: -------------------------------------------------------------------------------- 1 | $gradient-start: lighten(adjust-hue($primary, -10deg), 10%) 2 | $gradient-end: lighten(adjust-hue($primary, 10deg), 5%) 3 | $gradient-top: linear-gradient(135deg, $gradient-start 20%, transparent 20%, transparent 80%, $gradient-end 80%) 4 | $gradient-bottom: linear-gradient($primary, lighten($primary, 5%)) 5 | 6 | .header 7 | align-items: center 8 | background: $plum 9 | color: $plum-dark 10 | display: flex 11 | justify-content: flex-start 12 | padding: 3rem 2rem 13 | position: relative 14 | text-align: left 15 | 16 | $height: 96px 17 | $width: 486px 18 | 19 | .header-figure 20 | background-image: url("../images/css-reference-title.png") 21 | background-position: center center 22 | background-repeat: no-repeat 23 | background-size: $width $height 24 | display: inline-block 25 | height: $height 26 | overflow: hidden 27 | text-indent: -290486px 28 | vertical-align: top 29 | width: $width 30 | @media (max-width: 600px) 31 | background-size: ($width / 2) ($height / 2) 32 | height: $height / 2 33 | width: $width / 2 34 | 35 | .header-title 36 | color: $plum-invert 37 | font-size: 1.4rem 38 | font-weight: $weight-bold 39 | margin-top: 2rem 40 | text-shadow: 0 2px 4px rgba(#000, 0.1) 41 | 42 | .header-subtitle 43 | color: $plum-light 44 | max-width: 40em 45 | a 46 | border-bottom: 1px solid rgba($plum-light, 0.2) 47 | color: $plum-light 48 | &:hover 49 | border-bottom-color: $plum-light 50 | color: $plum-light 51 | strong 52 | color: $plum-light 53 | 54 | .back 55 | align-items: center 56 | background: $link 57 | color: $link-invert 58 | display: flex 59 | font-size: 0.8rem 60 | justify-content: flex-start 61 | padding: 1rem 1.2rem 62 | strong 63 | color: inherit 64 | margin-left: 1em 65 | &:hover 66 | background: $alpha 67 | color: $plum 68 | .icon:before, 69 | .icon:after 70 | background: $plum 71 | 72 | +desktop 73 | .header 74 | justify-content: center 75 | min-height: 400px 76 | padding: 4rem 77 | text-align: center 78 | -------------------------------------------------------------------------------- /_includes/collections/animations-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sass/variables.sass: -------------------------------------------------------------------------------- 1 | // Colors 2 | $plum: #310736 3 | $plum-invert: #fff 4 | $plum-dark: #622369 5 | $plum-light: #94529c 6 | 7 | $alpha: #05ffb0 8 | $alpha-invert: $plum 9 | $beta: #00e7eb 10 | $beta-invert: $plum 11 | 12 | $orange: hsl(14, 100%, 53%) 13 | $yellow: hsl(48, 100%, 67%) 14 | $green: hsl(141, 71%, 48%) 15 | $turquoise: hsl(171, 100%, 41%) 16 | $blue: hsl(217, 71%, 53%) 17 | $purple: hsl(271, 100%, 71%) 18 | $pink: hsl(348, 100%, 61%) 19 | $red: hsl(4, 100%, 61%) 20 | 21 | $orange-invert: findColorInvert($orange) 22 | $yellow-invert: findColorInvert($yellow) 23 | $green-invert: findColorInvert($green) 24 | $turquoise-invert: findColorInvert($turquoise) 25 | $blue-invert: findColorInvert($blue) 26 | $purple-invert: findColorInvert($purple) 27 | $red-invert: findColorInvert($red) 28 | 29 | $turquoise-dark: hsl(171, 100%, 21%) 30 | $turquoise-light: hsl(171, 100%, 96%) 31 | 32 | $purple-dark: hsl(271, 100%, 51%) 33 | $purple-light: hsl(271, 100%, 96%) 34 | 35 | // Social 36 | $facebook: #3b5998 37 | $github: #333333 38 | $instagram: #3f729b 39 | $hacker-news: #ff6600 40 | $soundcloud: #ff8800 41 | $twitter: #55acee 42 | $rss: #f26522 43 | 44 | // Inferred 45 | $text: hsl(0, 0%, 30%) 46 | $text-light: hsl(0, 0%, 50%) 47 | $text-strong: hsl(0, 0%, 20%) 48 | 49 | $primary: $turquoise 50 | $primary-invert: $turquoise-invert 51 | $primary-light: $turquoise-light 52 | $primary-dark: $turquoise-dark 53 | 54 | $link: $blue 55 | $link-invert: $blue-invert 56 | 57 | $background: hsl(0, 0%, 95%) 58 | $border: hsl(0, 0%, 90%) 59 | 60 | // Typography 61 | $family-primary: Helvetica, Tahoma, Arial, STXihei, "华文细黑", "Microsoft YaHei", "微软雅黑", SimSun, "宋体", Heiti, "黑体", sans-serif 62 | $family-monospace: "Source Code Pro", "Consolas", "Monaco", "Courier", monospace 63 | 64 | $weight-light: 300 65 | $weight-normal: 400 66 | $weight-bold: 700 67 | 68 | // Dimensions 69 | $logo-width: 190px 70 | $menu-width: $logo-width + (2 * 18px) 71 | // $menu-width: 240px 72 | $header-height: calc(100vh - #{$menu-width}) 73 | 74 | // Miscellaneous 75 | $shadow: 0 0 1rem rgba(#000, 0.1) 76 | $speed: 300ms 77 | -------------------------------------------------------------------------------- /_includes/collections/flexbox-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /property/background/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: background 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #background 18 |

19 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /sass/modal.sass: -------------------------------------------------------------------------------- 1 | .modal 2 | +overlay 3 | align-items: center 4 | background: rgba(#000, 0.7) 5 | display: flex 6 | justify-content: center 7 | opacity: 0 8 | padding: 1rem 9 | position: fixed 10 | transition-duration: $speed 11 | transition-property: opacity, visibility 12 | visibility: hidden 13 | 14 | .modal-box 15 | background: #fff 16 | flex-grow: 1 17 | flex-shrink: 1 18 | max-width: 46rem 19 | opacity: 0 20 | padding: 4rem 2rem 21 | position: relative 22 | transform: scale(0.95) 23 | transform-origin: center center 24 | transition-duration: $speed 25 | transition-property: opacity, transform, visibility 26 | 27 | .modal-title 28 | color: $text-strong 29 | font-size: 2rem 30 | font-weight: $weight-bold 31 | line-height: 1 32 | margin-bottom: 3rem 33 | text-align: center 34 | 35 | .modal-close 36 | background: $background 37 | border-radius: 290486px 38 | height: 3rem 39 | position: absolute 40 | right: 1rem 41 | top: 1rem 42 | transform: rotate(45deg) 43 | transform-origin: center center 44 | width: 3rem 45 | &:before, 46 | &:after 47 | background: $text-light 48 | content: "" 49 | display: block 50 | position: absolute 51 | &:before 52 | height: 50% 53 | left: 50% 54 | margin-left: -1px 55 | top: 25% 56 | width: 2px 57 | &:after 58 | height: 2px 59 | left: 25% 60 | margin-top: -1px 61 | top: 50% 62 | width: 50% 63 | &:hover 64 | background: darken($background, 5%) 65 | &:active 66 | background: darken($background, 10%) 67 | 68 | .modal.is-active 69 | opacity: 1 70 | visibility: visible 71 | .modal-box 72 | opacity: 1 73 | transform: scale(1) 74 | visibility: visible 75 | 76 | +mobile 77 | .modal-url 78 | .input 79 | display: block 80 | width: 100% 81 | .button 82 | margin-top: 1em 83 | .modal-social 84 | .button 85 | display: block 86 | margin-top: 1em 87 | 88 | +desktop 89 | .modal-box 90 | padding: 4rem 6rem 91 | .modal-url 92 | display: flex 93 | .input 94 | flex-grow: 1 95 | flex-shrink: 1 96 | .button 97 | flex-grow: 0 98 | flex-shrink: 0 99 | margin-left: 1em 100 | padding-left: 0 101 | padding-right: 0 102 | width: 5.5em 103 | .modal-social 104 | align-items: center 105 | display: flex 106 | margin-top: 1rem 107 | .button 108 | margin-right: 1em 109 | -------------------------------------------------------------------------------- /sass/footer.sass: -------------------------------------------------------------------------------- 1 | .footer 2 | background: #fff 3 | bottom: 0 4 | box-shadow: 0 0 1rem rgba(#000, 0.2) 5 | left: 0 6 | position: fixed 7 | right: 0 8 | 9 | .footer-title 10 | align-items: center 11 | color: $text-light 12 | display: none 13 | line-height: 1.2 14 | padding: 0 1rem 15 | small 16 | font-size: 0.8em 17 | margin-left: 0.5em 18 | a 19 | border-radius: 2px 20 | margin-left: -4px 21 | padding: 2px 4px 22 | &:hover 23 | background: $alpha 24 | color: $alpha-invert 25 | 26 | .footer-facebook, 27 | .footer-github 28 | align-items: center 29 | display: none 30 | flex-shrink: 0 31 | justify-content: flex-end 32 | iframe 33 | height: 20px 34 | 35 | .footer-share 36 | align-items: center 37 | display: flex 38 | position: relative 39 | 40 | .footer-share--contribute 41 | display: none 42 | 43 | .footer-share-label 44 | margin-right: 0.25rem 45 | 46 | .footer-share-button 47 | align-items: center 48 | display: flex 49 | height: 2rem 50 | justify-content: center 51 | position: relative 52 | width: 2rem 53 | &:before 54 | +overlay 55 | background: $background 56 | border-radius: 5px 57 | content: "" 58 | display: block 59 | height: 100% 60 | opacity: 0 61 | transform: scale(1.2) 62 | transform-origin: center center 63 | transition-duration: $speed 64 | transition-property: opacity, transform 65 | width: 100% 66 | svg 67 | height: 1rem 68 | position: relative 69 | width: 1rem 70 | &:hover:before 71 | opacity: 1 72 | transform: scale(1) 73 | 74 | .footer-share-nav 75 | align-items: center 76 | bottom: 0 77 | display: flex 78 | font-weight: $weight-bold 79 | padding: 0 1rem 80 | position: absolute 81 | right: 0 82 | top: 0 83 | 84 | +mobile 85 | .footer-share--social 86 | padding: 0.5rem 1rem 87 | 88 | +desktop 89 | .footer 90 | align-items: stretch 91 | display: flex 92 | font-size: 0.8rem 93 | height: 3rem 94 | left: $menu-width 95 | .footer-share, 96 | .footer-facebook, 97 | .footer-github 98 | display: flex 99 | .footer-title 100 | display: none 101 | padding: 0.25rem 1rem 102 | .footer-share 103 | border-left: 1px solid $border 104 | flex-grow: 1 105 | flex-shrink: 1 106 | padding: 0.25rem 1rem 107 | .footer-share-nav 108 | display: none 109 | 110 | +from(1000px) 111 | .footer-title 112 | display: flex 113 | -------------------------------------------------------------------------------- /property/animation/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: animation 4 | --- 5 | 6 |
7 |
8 | 17 |

18 | #animation 19 |

20 |
21 |

Shorthand property for animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode and animation-play-state.

22 |

Only animation-duration and animation-name are required.

23 | 24 |
25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | -------------------------------------------------------------------------------- /property/outline-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: outline-width 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #outline-width 15 |

16 |
17 |

Defines the width of the element's outlines.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | outline-width: medium; 35 |

36 |
37 |

Defines the width of all outlines to medium.

38 | 39 |
40 |
41 | 42 | 48 | 49 |
50 |
51 |
52 |

53 | 54 | 55 | outline-width: 1px; 56 |

57 |
58 |

Defines the width of all outlines to 1px.

59 | 60 |
61 |
62 | 63 | 69 | 70 |
71 | 72 |
73 | -------------------------------------------------------------------------------- /property/border-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-width 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #border-width 18 |

19 |
20 |

Defines the width of the element's borders.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 35 | 36 | border-width: 1px; 37 |

38 |
39 |

Defines the width of all borders to 1px.

40 | 41 |
42 |
43 | 44 | 50 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | border-width: 2px 0; 58 |

59 |
60 |

Defines the top and bottom borders to 2px, the left and right to 0.

61 | 62 |
63 |
64 | 65 | 71 | 72 |
73 | 74 |
75 | -------------------------------------------------------------------------------- /property/text-decoration/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: text-decoration 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #text-decoration 18 |

19 |
20 |

Defines how the text content of the element is decorated.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 |

33 | 默认属性 34 | 35 | 36 | text-decoration: none; 37 |

38 |
39 |

Removes any text decoration.

40 | 41 |
42 |
43 | 44 | 50 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | text-decoration: underline; 58 |

59 |
60 |

Underlines the text content.

61 | 62 |
63 |
64 | 65 | 71 | 72 |
73 | 74 |
75 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | template: index 3 | --- 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{site.title}} - {{site.subtitle}} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% include favicons.html %} 33 | 34 | 35 | {% include menu.html %} 36 |
37 |
38 |
39 |

40 | {{site.title}} 41 |

42 |

43 | A free visual guide to CSS 44 |

45 |

46 | cssreference.parryqiu.com 是一个免费的 CSS 可视化文档 47 |

48 |

文档使用了大量的可视化图形以及动画对属性进行了解释

49 |

50 | 项目 fork 于 cssreference.io,翻译成中文的工作正在进行中 51 |

52 |

53 | [2017-01-08] Flexbox 的部分已完成 54 |

55 |
56 |
57 |
58 | 62 | 65 |
66 |
67 | {% include modals/share.html %} 68 | {% include google-fonts.html %} 69 | 70 | 71 | {% include noscript.html %} 72 | 73 | 74 | -------------------------------------------------------------------------------- /property/font-variant/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: font-variant 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #font-variant 18 |

19 |
20 |

Defines which glyph to use for each letter.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | font-variant: normal; 38 |

39 |
40 |

Each letter uses its normal glyph.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | font-variant: small-caps; 59 |

60 |
61 |

Each letter uses its small capitalized version.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /sass/elements.sass: -------------------------------------------------------------------------------- 1 | .box 2 | border: 2px solid $text 3 | border-radius: 3px 4 | position: relative 5 | &:before 6 | background: $text 7 | border-radius: 1px 0 2px 0 8 | color: #fff 9 | content: "" 10 | display: inline-block 11 | font-size: 0.8em 12 | padding: 0 6px 2px 4px 13 | vertical-align: top 14 | .box--red 15 | border-color: $red 16 | &:before 17 | background: $red 18 | .box--green 19 | border-color: $green 20 | &:before 21 | background: $green 22 | .box--plum 23 | border-color: $plum 24 | &:before 25 | background: $plum 26 | .box--alpha 27 | border-color: $alpha 28 | &:before 29 | background: $alpha 30 | color: $alpha-invert 31 | 32 | .line 33 | background: $text 34 | height: 1px 35 | position: relative 36 | &:before 37 | background: $text 38 | border-radius: 2px 39 | color: #fff 40 | content: "Line" 41 | display: inline-block 42 | font-size: 10px 43 | height: 15px 44 | line-height: 15px 45 | margin-top: -6px 46 | padding: 0 4px 47 | vertical-align: top 48 | .line--red 49 | background: $red 50 | &:before 51 | background: $red 52 | 53 | .square 54 | align-items: center 55 | background: $border 56 | border-radius: 3px 57 | color: $text 58 | display: flex 59 | height: 75px 60 | justify-content: center 61 | line-height: 1.2 62 | padding: 0 63 | text-align: center 64 | width: 75px 65 | .square--plum 66 | background: $plum 67 | color: $plum-invert 68 | &:before 69 | background: $plum 70 | .square--alpha 71 | background: $alpha 72 | color: $plum 73 | &:before 74 | background: $alpha 75 | .square--pink 76 | background: $pink 77 | color: #fff 78 | &:before 79 | background: $pink 80 | 81 | .block 82 | background: $background 83 | border-radius: 3px 84 | color: $text 85 | display: block 86 | line-height: 1.2 87 | padding: 1em 88 | strong 89 | color: inherit 90 | .block--alpha 91 | background: $alpha 92 | color: $plum 93 | .block--beta 94 | background: $beta 95 | color: $plum 96 | .block--pink 97 | background: $pink 98 | color: $plum 99 | .block--plum 100 | background: $plum 101 | color: #fff 102 | .block--yellow 103 | background: $yellow 104 | color: $plum 105 | .block--orange 106 | background: $orange 107 | color: $plum 108 | .block--green 109 | background: $green 110 | color: $plum 111 | .block--turquoise 112 | background: $turquoise 113 | color: $plum 114 | .block--blue 115 | background: $blue 116 | color: $plum 117 | .block--purple 118 | background: $purple 119 | color: $plum 120 | .block--red 121 | background: $red 122 | color: $plum 123 | 124 | .natural, 125 | .actual 126 | +center 127 | border-radius: 3px 128 | line-height: 1.2 129 | padding: 0.8em 1em 130 | 131 | .natural 132 | border: 2px dotted $red 133 | color: $red 134 | 135 | .actual 136 | +center 137 | background: $alpha 138 | border: 2px solid $alpha 139 | color: $plum 140 | -------------------------------------------------------------------------------- /property/border-top-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-top-width 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #border-top-width 18 |

19 |
20 |

Like border-width, but for the top border only.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | border-top-width: 0; 38 |

39 |
40 |

Removes the top border.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | border-top-width: 4px; 59 |

60 |
61 |

You can use pixel values.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /property/overflow-wrap/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: overflow-wrap 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #overflow-wrap 15 |

16 |
17 |

Defines if words should break when reaching the end of a line.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | overflow-wrap: normal; 35 |

36 |
37 |

Words with no space will not break. Sequences of uninterrupted characters will be displayed on a single line.

38 | 39 |
40 |
41 | 42 | 48 | 49 |
50 |
51 |
52 |

53 | 54 | 55 | overflow-wrap: break-word; 56 |

57 |
58 |

Words with no space will break as soon as they reach the end of a line.

59 | 60 |
61 |
62 | 63 | 69 | 70 |
71 | 72 |
73 | -------------------------------------------------------------------------------- /property/border-left-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-left-width 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #border-left-width 18 |

19 |
20 |

Like border-width, but for the left border only.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | border-left-width: 0; 38 |

39 |
40 |

Removes the left border.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | border-left-width: 4px; 59 |

60 |
61 |

You can use pixel values.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /property/border/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border 15 |

16 |
17 |

Shorthand property for border-width border-style and border-color.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 31 | 32 | border: 4px dotted red; 33 |

34 |
35 |

The order is important:

36 |
  • width
  • style
  • color
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | border: 2px solid; 54 |

55 |
56 |

Only the color is optional. If you omit it, the color applied will be the color of the text.

57 | 58 |
59 |
60 | 61 | 67 | 68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /property/border-right-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-right-width 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #border-right-width 18 |

19 |
20 |

Like border-width, but for the right border only.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | border-right-width: 0; 38 |

39 |
40 |

Removes the right border.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | border-right-width: 4px; 59 |

60 |
61 |

You can use pixel values.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /sass/controls.sass: -------------------------------------------------------------------------------- 1 | .input, 2 | .textarea, 3 | .button 4 | -moz-appearance: none 5 | -webkit-appearance: none 6 | background: $background 7 | border: none 8 | font-size: 1em 9 | line-height: 1.6 10 | padding: 0.6em 1em 11 | 12 | .textarea 13 | max-height: 100% 14 | max-width: 100% 15 | min-height: 6em 16 | 17 | .button 18 | border-radius: 3px 19 | box-shadow: 0 2px 2px rgba(#000, 0.2) 20 | cursor: pointer 21 | font-weight: $weight-bold 22 | padding-left: 1.2em 23 | padding-right: 1.2em 24 | text-align: center 25 | transition-duration: $speed 26 | transition-property: background, box-shadow, color, transform 27 | will-change: box-shadow 28 | &:hover 29 | box-shadow: 0 4px 8px rgba(#000, 0.2) 30 | transform: translateY(-1px) 31 | &:active 32 | box-shadow: 0 0 0 rgba(#000, 0.01) 33 | transform: translateY(0) 34 | 35 | .button.is-primary 36 | background: $primary 37 | color: $primary-invert 38 | &:hover 39 | background: darken($primary, 5%) 40 | &:active 41 | background: darken($primary, 10%) 42 | 43 | .button.is-facebook 44 | background: $facebook 45 | color: #fff 46 | &:hover 47 | background: darken($facebook, 5%) 48 | &:active 49 | background: darken($facebook, 10%) 50 | 51 | .button.is-twitter 52 | background: $twitter 53 | color: #fff 54 | &:hover 55 | background: darken($twitter, 5%) 56 | &:active 57 | background: darken($twitter, 10%) 58 | 59 | .icon 60 | display: block 61 | pointer-events: none 62 | position: relative 63 | transition-duration: $speed 64 | transition-property: opacity 65 | 66 | .icon.is-back 67 | height: 7px 68 | transform: rotate(-45deg) 69 | transform-origin: center center 70 | width: 7px 71 | &:before, 72 | &:after 73 | background: $plum-invert 74 | border-radius: 4px 75 | content: "" 76 | display: block 77 | transition-duration: $speed 78 | transition-property: background 79 | &:before 80 | height: 2px 81 | &:after 82 | height: 7px 83 | margin-top: -2px 84 | width: 2px 85 | 86 | .icon.is-close 87 | height: 14px 88 | transform: rotate(45deg) 89 | transform-origin: center center 90 | width: 14px 91 | &:before, 92 | &:after 93 | background: $link-invert 94 | border-radius: 4px 95 | content: "" 96 | display: block 97 | position: absolute 98 | &:before 99 | height: 4px 100 | left: 0 101 | margin-top: -2px 102 | top: 50% 103 | width: 14px 104 | &:after 105 | height: 14px 106 | left: 50% 107 | margin-left: -2px 108 | top: 0 109 | width: 4px 110 | 111 | .icon.is-search 112 | border: 2px solid $text-light 113 | border-radius: 290486px 114 | height: 12px 115 | transform: rotate(-45deg) translateX(4px) translateY(-5px) 116 | transform-origin: center center 117 | width: 12px 118 | &:before 119 | background: $text-light 120 | border-radius: 290486px 121 | content: "" 122 | height: 7px 123 | left: 50% 124 | margin-left: -1px 125 | position: absolute 126 | top: 100% 127 | width: 2px 128 | -------------------------------------------------------------------------------- /property/outline/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: outline 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #outline 15 |

16 |
17 |

Shorthand property for outline-width outline-style and outline-color.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 31 | 32 | outline: 4px dotted red; 33 |

34 |
35 |

The order is important:

36 |
  • width
  • style
  • color
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | outline: 2px solid; 54 |

55 |
56 |

Only the color is optional. If you omit it, the color applied will be the color of the text.

57 | 58 |
59 |
60 | 61 | 67 | 68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /property/border-bottom-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-bottom-width 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #border-bottom-width 18 |

19 |
20 |

Like border-width, but for the bottom border only.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | border-bottom-width: 0; 38 |

39 |
40 |

Removes the bottom border.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | border-bottom-width: 4px; 59 |

60 |
61 |

You can use pixel values.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /property/column-count/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: column-count 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #column-count 15 |

16 |
17 |

Defines the number of columns of the element.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 默认属性 31 | 32 | 33 | column-count: auto; 34 |

35 |
36 |

Removes any columns from the element (unless another column- property was set).

37 | 38 |
39 |
40 | 41 | 47 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | column-count: 3; 55 |

56 |
57 |

When using an integer value, the element will distribute its child elements across the number of columns defined.

58 | 59 |
60 |
61 | 62 | 68 | 69 | 70 |
71 | 72 |
73 | -------------------------------------------------------------------------------- /property/word-break/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: word-break 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #word-break 18 |

19 |
20 |

Defines how words should break when reaching the end of a line.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | word-break: normal; 38 |

39 |
40 |

Words with no space will not break. Sequences of uninterrupted characters will be displayed on a single line.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | word-break: break-all; 59 |

60 |
61 |

Words with no space will break as soon as they reach the end of a line.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /property/flex-basis/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: flex-basis 4 | --- 5 | 6 |
7 |
8 | 10 |

11 | #flex-basis 12 |

13 |
14 |

定义 flexbox 的初始化大小。

15 | 16 |
17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |

28 | 默认属性 29 | 30 | 31 | flex-basis: auto; 32 |

33 |
34 |

元素根据自身的内容自动调整大小,或者根据已定义的 高度宽度 调整大小。

35 | 36 |
37 |
38 | 39 | 45 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | flex-basis: 80px; 54 |

55 |
56 |

你可以定义 pixel(r)em 值。元素将换行其内容避开任何的元素溢出。

57 | 58 |
59 |
60 | 61 | 67 | 68 | 69 |
70 | 71 |
72 | -------------------------------------------------------------------------------- /property/border-top/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-top 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-top 15 |

16 |
17 |

Shorthand property for border-top-width border-top-style and border-top-color.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 31 | 32 | border-top: 4px dotted red; 33 |

34 |
35 |

The order is important:

36 |
  • width
  • style
  • color
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | border-top: 2px solid; 54 |

55 |
56 |

Only the color is optional. If you omit it, the color applied will be the color of the text.

57 | 58 |
59 |
60 | 61 | 67 | 68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /property/border-left/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-left 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-left 15 |

16 |
17 |

Shorthand property for border-left-width border-left-style and border-left-color.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 31 | 32 | border-left: 4px dotted red; 33 |

34 |
35 |

The order is important:

36 |
  • width
  • style
  • color
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | border-left: 2px solid; 54 |

55 |
56 |

Only the color is optional. If you omit it, the color applied will be the color of the text.

57 | 58 |
59 |
60 | 61 | 67 | 68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /property/border-right/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-right 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-right 15 |

16 |
17 |

Shorthand property for border-right-width border-right-style and border-right-color.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 31 | 32 | border-right: 4px dotted red; 33 |

34 |
35 |

The order is important:

36 |
  • width
  • style
  • color
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | border-right: 2px solid; 54 |

55 |
56 |

Only the color is optional. If you omit it, the color applied will be the color of the text.

57 | 58 |
59 |
60 | 61 | 67 | 68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /_layouts/collection.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{page.collection_name}} - {{site.title}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {% include favicons.html %} 28 | 29 | 30 | {% include menu.html %} 31 |
32 |
33 |
34 |

35 | {{page.collection_name}} in CSS 36 |

37 |

在 CSS 中可{{page.description}}

38 |
39 | 57 |
58 |
59 | {{content}} 60 |
61 |
62 | {% include modals/share.html %} 63 | {% include google-fonts.html %} 64 | 65 | 66 | {% include noscript.html %} 67 | 68 | 69 | -------------------------------------------------------------------------------- /property/border-bottom/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-bottom 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-bottom 15 |

16 |
17 |

Shorthand property for border-bottom-width border-bottom-style and border-bottom-color.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 31 | 32 | border-bottom: 4px dotted red; 33 |

34 |
35 |

The order is important:

36 |
  • width
  • style
  • color
37 |
38 |
39 | 40 | 46 | 47 |
48 |
49 |
50 |

51 | 52 | 53 | border-bottom: 2px solid; 54 |

55 |
56 |

Only the color is optional. If you omit it, the color applied will be the color of the text.

57 | 58 |
59 |
60 | 61 | 67 | 68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /property/column-gap/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: column-gap 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #column-gap 15 |

16 |
17 |

Defines the gap between the columns of the element.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | column-gap: normal; 35 |

36 |
37 |

The gap between the columns is set to the browser's default value, which usually is 1em.

38 | 39 |
40 |
41 | 42 | 48 | 49 |
50 |
51 |
52 |

53 | 54 | 55 | column-gap: 2px; 56 |

57 |
58 |

You can use pixel values for the gap.

59 |

Note that the gap only appears between columns, and not on the exterior sides of the edge columns.

60 | 61 |
62 |
63 | 64 | 70 | 71 | 72 |
73 | 74 |
75 | -------------------------------------------------------------------------------- /property/column-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: column-width 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #column-width 15 |

16 |
17 |

Defines the number of columns of the element.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |

30 | 默认属性 31 | 32 | 33 | column-width: auto; 34 |

35 |
36 |

The element will not distribute its child elements into columns, unlesse a column-count value is defined. In that case, the column width will be infered from the column count.

37 | 38 |
39 |
40 | 41 | 47 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | column-width: 10px; 55 |

56 |
57 |

You can use pixel values for the column width.

58 |

The number of columns will be the minimum needed to distribute all the content across the element.

59 | 60 |
61 |
62 | 63 | 69 | 70 | 71 |
72 | 73 |
74 | -------------------------------------------------------------------------------- /sass/property.sass: -------------------------------------------------------------------------------- 1 | .properties 2 | padding-bottom: 3rem 3 | position: relative 4 | 5 | .property 6 | background-color: #fff 7 | background-image: linear-gradient($primary-light, #fff) 8 | background-repeat: no-repeat 9 | background-size: 100% 4rem 10 | border-top: 2px solid $primary 11 | overflow: hidden 12 | padding-bottom: 3rem 13 | padding-top: 2rem 14 | 15 | .property--shorthand 16 | background-image: linear-gradient($purple-light, #fff) 17 | border-top-color: $purple 18 | 19 | .property-links 20 | align-items: center 21 | display: flex 22 | font-size: 0.7rem 23 | justify-content: flex-end 24 | opacity: 0.5 25 | transition-duration: $speed 26 | transition-property: opacity 27 | a 28 | border-bottom: 1px solid transparent 29 | color: $text-light 30 | margin-left: 1em 31 | &:before 32 | left: auto 33 | right: 0 34 | transform: translateX(0) translateY(0) 35 | white-space: nowrap 36 | &:hover 37 | border-bottom-color: $link 38 | color: $link 39 | &:before 40 | transform: translateX(0) translateY(-4px) 41 | strong 42 | text-transform: capitalize 43 | &:hover 44 | opacity: 1 45 | .property-collections 46 | a 47 | margin-left: 0.25em 48 | 49 | .property-name 50 | font-size: 1.2rem 51 | font-weight: $weight-bold 52 | a 53 | border-bottom: 1px solid transparent 54 | color: $text-strong 55 | display: inline-block 56 | position: relative 57 | vertical-align: top 58 | span 59 | color: $border 60 | padding-right: 0.6em 61 | position: absolute 62 | right: 100% 63 | top: 0 64 | &:hover 65 | border-bottom-color: $link 66 | color: $link 67 | span 68 | color: $link 69 | 70 | .property-description 71 | code 72 | background: $background 73 | border-radius: 2px 74 | color: $text-strong 75 | padding: 0.2em 0.4em 76 | p 77 | margin-top: 0.5em 78 | .shorthand 79 | padding: 0 80 | a 81 | background: $background 82 | border-radius: 2px 83 | padding: 0.2em 0.4em 84 | &:hover 85 | background: $link 86 | color: $link-invert 87 | 88 | .property-animation 89 | display: flex 90 | margin-top: 1rem 91 | .button 92 | background: $green 93 | color: #fff 94 | font-size: 0.8rem 95 | &:before 96 | content: "▶ Play animations" 97 | &:first-letter 98 | margin-right: 0.25em 99 | &.is-playing 100 | background: $red 101 | &:before 102 | content: "■ Stop" 103 | 104 | +mobile 105 | .property-header 106 | padding-left: 2rem 107 | padding-right: 2rem 108 | .property-links 109 | flex-wrap: wrap 110 | margin-bottom: 0.5rem 111 | 112 | +desktop 113 | // .property 114 | // margin-bottom: 3rem 115 | // margin-left: auto 116 | // margin-right: auto 117 | // width: 500px 118 | .property-header 119 | padding-left: 3rem 120 | padding-right: 3rem 121 | .property-links 122 | float: right 123 | padding: 0.25rem 0 124 | 125 | // +from(1000px) 126 | // .property 127 | // width: 700px 128 | 129 | // +from(1200px) 130 | // .property 131 | // width: 900px 132 | 133 | // +from(1400px) 134 | // .property 135 | // width: 1100px 136 | 137 | // +from(1600px) 138 | // .property 139 | // width: 1300px 140 | -------------------------------------------------------------------------------- /property/text-overflow/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: text-overflow 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #text-overflow 18 |

19 |
20 |

Defines how the hidden text content behaves if it's overflowing.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |

35 | 默认属性 36 | 37 | 38 | text-overflow: clip; 39 |

40 |
41 |

The text content is clipped and not accessible.

42 | 43 |
44 |
45 | 46 | 52 | 53 | 54 |
55 |
56 |
57 |

58 | 59 | 60 | text-overflow: ellipsis; 61 |

62 |
63 |

The overflowing content is replaced by an ellipsis:

64 | 65 |
66 |
67 | 68 | 74 | 75 | 76 |
77 | 78 |
79 | -------------------------------------------------------------------------------- /property/list-style-image/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: list-style-image 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #list-style-image 15 |

16 |
17 |

Defines the image to be used as an list item's bullet point.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | list-style-image: none; 35 |

36 |
37 |

The list items will use the bullet point defined by the list-style-type value, which by default is a disc.

38 | 39 |
40 |
41 | 42 | 48 | 49 |
50 |
51 |
52 |

53 | 54 | 55 | list-style-image: url(/images/list-style-image.png); 56 |

57 |
58 |

The list items will use the image located at the specified URL as their bullet point.
The image can not be resized.

59 | 60 |
61 |
62 | 63 | 69 | 70 | 71 |
72 | 73 |
74 | -------------------------------------------------------------------------------- /property/opacity/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: opacity 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #opacity 15 |

16 |
17 |

Defines how opaque the element is.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | opacity: 1; 35 |

36 |
37 |

The element is fully opaque.

38 | 39 |
40 |
41 | 42 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | opacity: 0; 55 |

56 |
57 |

The element is fully transparent.

58 | 59 |
60 |
61 | 62 | 68 | 69 |
70 |
71 |
72 |

73 | 74 | 75 | opacity: 0.3; 76 |

77 |
78 |

Any value between 0 (zero) and 1 (one) will make the element semi transparent.

79 | 80 |
81 |
82 | 83 | 89 | 90 |
91 | 92 |
93 | -------------------------------------------------------------------------------- /_includes/collections/typography-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /property/background-attachment/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: background-attachment 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #background-attachment 18 |

19 |
20 |

Defines how the background image will behave when scrolling the page.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |

35 | 默认属性 36 | 37 | 38 | background-attachment: scroll; 39 |

40 |
41 |

The background image will scroll with the page. It will also position and resize itself according to the element it's applied to.

42 | 43 |
44 |
45 | 46 | 52 | 53 |
54 |
55 |
56 |

57 | 58 | 59 | background-attachment: fixed; 60 |

61 |
62 |

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.

63 | 64 |
65 |
66 | 67 | 73 | 74 |
75 | 76 |
77 | -------------------------------------------------------------------------------- /property/pointer-events/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: pointer-events 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #pointer-events 15 |

16 |
17 |

Defines if the element reacts to pointer events or not.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | pointer-events: auto; 35 |

36 |
37 |

The element reacts to pointer events, like :hover or click.

38 | 39 |
40 |
41 | 42 | 48 | 49 |
50 |
51 |
52 |

53 | 54 | 55 | pointer-events: none; 56 |

57 |
58 |

The element does not react to pointer events, like :hover or click. As a result, elements that are behind are accessible.

59 | 60 |
61 |
62 | 63 | 69 | 70 | 71 |
72 | 73 |
74 | -------------------------------------------------------------------------------- /sass/example.sass: -------------------------------------------------------------------------------- 1 | .example-value, 2 | .example-default, 3 | .example-recommended 4 | background: $yellow 5 | border-radius: 2px 6 | color: $yellow-invert 7 | display: inline-block 8 | padding: 0.25em 0.5em 0em 9 | vertical-align: top 10 | 11 | .example-value 12 | cursor: pointer 13 | position: relative 14 | 15 | .example-default, 16 | .example-recommended 17 | background: #fff 18 | float: right 19 | 20 | .example-default 21 | box-shadow: inset 0 0 0 1px $red 22 | color: $red 23 | 24 | .example-recommended 25 | box-shadow: inset 0 0 0 1px $green 26 | color: $green 27 | 28 | .example-fixed 29 | display: flex 30 | margin-top: 1rem 31 | .button 32 | background: $green 33 | color: #fff 34 | font-size: 0.8rem 35 | &:before 36 | content: "Enable position fixed" 37 | &.is-enabled 38 | background: $red 39 | &:before 40 | content: "Disabled position fixed" 41 | 42 | .example-description 43 | font-size: 0.9rem 44 | margin-top: 0.5rem 45 | a 46 | border-bottom: 1px solid $border 47 | color: $text-strong 48 | &:hover 49 | border-bottom-color: $link 50 | code 51 | background: $background 52 | border-radius: 2px 53 | color: $text-strong 54 | padding: 0.2em 0.4em 55 | p, 56 | pre, 57 | ul 58 | margin-top: 0.5em 59 | ul 60 | list-style-position: outside 61 | list-style-type: disc 62 | margin-left: 1.5em 63 | pre 64 | background: $background 65 | color: $text-strong 66 | font-size: 0.8em 67 | line-height: 1.4 68 | padding: 0.8em 1em 69 | .shorthand 70 | padding: 0 71 | a 72 | background: $background 73 | border-radius: 2px 74 | padding: 0.2em 0.4em 75 | &:hover 76 | background: $link 77 | color: $link-invert 78 | 79 | .example-browser 80 | align-items: center 81 | background: $background 82 | border: 1px solid $border 83 | border-bottom: none 84 | border-top-left-radius: 3px 85 | border-top-right-radius: 3px 86 | display: flex 87 | height: 1rem 88 | justify-content: flex-start 89 | padding-left: 0.5rem 90 | i 91 | background: rgba(black, 0.2) 92 | border-radius: 290486px 93 | display: block 94 | flex-grow: 0 95 | flex-shrink: 0 96 | height: 4px 97 | margin-right: 2px 98 | width: 4px 99 | 100 | .example-output 101 | border: 1px solid $border 102 | border-bottom-left-radius: 4px 103 | border-bottom-right-radius: 4px 104 | box-shadow: 0 2px 3px rgba(#000, 0.05) 105 | font-size: 0.8em 106 | padding: 0.5em 107 | 108 | .example-output-div 109 | padding: 0.8em 1em 110 | position: relative 111 | 112 | .example-complements 113 | background: $background 114 | font-size: 0.9em 115 | margin-bottom: -3rem 116 | strong 117 | font-weight: $weight-normal 118 | padding-left: 0.35em 119 | .shorthand 120 | padding: 0 121 | a 122 | background: #fff 123 | border-radius: 2px 124 | padding: 0.2em 0.4em 125 | &:hover 126 | background: $link 127 | color: $link-invert 128 | 129 | +mobile 130 | .example 131 | padding: 2rem 2rem 0 132 | .example-preview 133 | margin-top: 1rem 134 | .example-complements 135 | margin-top: 2rem 136 | padding: 2rem 137 | 138 | +desktop 139 | .example 140 | align-items: flex-start 141 | display: flex 142 | padding: 2rem 3rem 0 143 | .example-header, 144 | .example-preview 145 | flex-grow: 1 146 | flex-shrink: 1 147 | .example-header 148 | padding-right: 2rem 149 | width: 60% 150 | .example-preview 151 | width: 40% 152 | .example-complements 153 | margin-top: 3rem 154 | padding: 2rem 3rem 155 | -------------------------------------------------------------------------------- /property/font-style/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: font-style 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #font-style 18 |

19 |
20 |

Defines how much the text is slanted.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | font-style: normal; 38 |

39 |
40 |

The text is not slanted.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | font-style: italic; 59 |

60 |
61 |

Use the italic version of the font: the letters are slightly slanted.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 |
75 |
76 |

77 | 78 | 79 | font-style: oblique; 80 |

81 |
82 |

Use the oblique version of the font: the letters are more slanted than italic.

83 | 84 |
85 |
86 | 87 | 93 | 94 |
95 | 96 |
97 | -------------------------------------------------------------------------------- /property/word-spacing/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: word-spacing 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #word-spacing 18 |

19 |
20 |

Defines the spacing between words of a block of text.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 |

33 | 默认属性 34 | 35 | 36 | word-spacing: normal; 37 |

38 |
39 |

The spacing between the characters is normal.

40 | 41 |
42 |
43 | 44 | 50 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | word-spacing: 5px; 58 |

59 |
60 |

You can use pixel values.

61 | 62 |
63 |
64 | 65 | 71 | 72 |
73 |
74 |
75 |

76 | 77 | 78 | word-spacing: 2em; 79 |

80 |
81 |

You can use em values: this allows the spacing to remain relative to the font-size.

82 | 83 |
84 |
85 | 86 | 92 | 93 |
94 | 95 |
96 | -------------------------------------------------------------------------------- /property/letter-spacing/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: letter-spacing 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #letter-spacing 18 |

19 |
20 |

Defines the spacing between the characters of a block of text.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
31 |
32 |

33 | 默认属性 34 | 35 | 36 | letter-spacing: normal; 37 |

38 |
39 |

The spacing between the characters is normal.

40 | 41 |
42 |
43 | 44 | 50 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | letter-spacing: 2px; 58 |

59 |
60 |

You can use pixel values.

61 | 62 |
63 |
64 | 65 | 71 | 72 |
73 |
74 |
75 |

76 | 77 | 78 | letter-spacing: 0.1em; 79 |

80 |
81 |

You can use em values: this allows the spacing to remain relative to the font-size.

82 | 83 |
84 |
85 | 86 | 92 | 93 |
94 | 95 |
96 | -------------------------------------------------------------------------------- /property/height/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: height 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #height 18 |

19 |
20 |

Defines the height of the element.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | height: auto; 38 |

39 |
40 |

The element will automatically adjust its height to allow its content to be displayed correctly.

41 | 42 |
43 |
44 | 45 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | height: 100px; 58 |

59 |
60 |

You can use numeric values like pixels, (r)em, percentages...

61 |

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 overflow property.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /property/min-width/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: min-width 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #min-width 18 |

19 |
20 |

Defines the minimum width of the element.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | min-width: 0; 38 |

39 |
40 |

The element has no minimum width.

41 | 42 |
43 |
44 | 45 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | min-width: 300px; 58 |

59 |
60 |

You can use numeric values like pixels, (r)em, percentages...

61 |

If the minimum width is larger than the element's actual width, the min width will be applied.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 |
75 |
76 |

77 | 78 | 79 | min-width: 5px; 80 |

81 |
82 |

If the minimum width is smaller than the element's actual width, the min width has no effect.

83 | 84 |
85 |
86 | 87 | 93 | 94 |
95 | 96 |
97 | -------------------------------------------------------------------------------- /property/border-top-color/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-top-color 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-top-color 15 |

16 |
17 |

Like border-color, but for the top border only.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 32 | 33 | border-top-color: transparent; 34 |

35 |
36 |

Applies a transparent color to the top border. The top border will still take up the space defined by the border-width value.

37 | 38 |
39 |
40 | 41 | 47 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | border-top-color: red; 55 |

56 |
57 |

You can use one of the 140+ color names.

58 | 59 |
60 |
61 | 62 | 68 | 69 |
70 |
71 |
72 |

73 | 74 | 75 | border-top-color: #05ffb0; 76 |

77 |
78 |

You can use hexadecimal color codes, rgb(), rgba(), hsl(), hsla()...

79 | 80 |
81 |
82 | 83 | 89 | 90 |
91 | 92 |
93 | -------------------------------------------------------------------------------- /property/border-left-color/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-left-color 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-left-color 15 |

16 |
17 |

Like border-color, but for the left border only.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 32 | 33 | border-left-color: transparent; 34 |

35 |
36 |

Applies a transparent color to the left border. The left border will still take up the space defined by the border-width value.

37 | 38 |
39 |
40 | 41 | 47 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | border-left-color: red; 55 |

56 |
57 |

You can use one of the 140+ color names.

58 | 59 |
60 |
61 | 62 | 68 | 69 |
70 |
71 |
72 |

73 | 74 | 75 | border-left-color: #05ffb0; 76 |

77 |
78 |

You can use hexadecimal color codes, rgb(), rgba(), hsl(), hsla()...

79 | 80 |
81 |
82 | 83 | 89 | 90 |
91 | 92 |
93 | -------------------------------------------------------------------------------- /property/border-right-color/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-right-color 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-right-color 15 |

16 |
17 |

Like border-color, but for the right border only.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 32 | 33 | border-right-color: transparent; 34 |

35 |
36 |

Applies a transparent color to the right border. The right border will still take up the space defined by the border-width value.

37 | 38 |
39 |
40 | 41 | 47 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | border-right-color: red; 55 |

56 |
57 |

You can use one of the 140+ color names.

58 | 59 |
60 |
61 | 62 | 68 | 69 |
70 |
71 |
72 |

73 | 74 | 75 | border-right-color: #05ffb0; 76 |

77 |
78 |

You can use hexadecimal color codes, rgb(), rgba(), hsl(), hsla()...

79 | 80 |
81 |
82 | 83 | 89 | 90 |
91 | 92 |
93 | -------------------------------------------------------------------------------- /property/background-clip/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: background-clip 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #background-clip 18 |

19 |
20 |

Defines how far the background should extend within the element.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | background-clip: border-box; 38 |

39 |
40 |

The background extends completely throughout the element, even under the border.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | background-clip: padding-box; 59 |

60 |
61 |

The background only extends to the edge of the border: it includes the padding but not the border.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 |
75 |
76 |

77 | 78 | 79 | background-clip: content-box; 80 |

81 |
82 |

The background only extends to the edge of the content: it doesn't include the padding, nor the border.

83 | 84 |
85 |
86 | 87 | 93 | 94 |
95 | 96 |
97 | -------------------------------------------------------------------------------- /property/border-bottom-color/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-bottom-color 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-bottom-color 15 |

16 |
17 |

Like border-color, but for the bottom border only.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 32 | 33 | border-bottom-color: transparent; 34 |

35 |
36 |

Applies a transparent color to the bottom border. The bottom border will still take up the space defined by the border-width value.

37 | 38 |
39 |
40 | 41 | 47 | 48 |
49 |
50 |
51 |

52 | 53 | 54 | border-bottom-color: red; 55 |

56 |
57 |

You can use one of the 140+ color names.

58 | 59 |
60 |
61 | 62 | 68 | 69 |
70 |
71 |
72 |

73 | 74 | 75 | border-bottom-color: #05ffb0; 76 |

77 |
78 |

You can use hexadecimal color codes, rgb(), rgba(), hsl(), hsla()...

79 | 80 |
81 |
82 | 83 | 89 | 90 |
91 | 92 |
93 | -------------------------------------------------------------------------------- /property/border-collapse/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: border-collapse 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #border-collapse 15 |

16 |
17 |

Defines whether table borders should be separated or collapsed.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | border-collapse: separate; 35 |

36 |
37 |

Each table cell will display its own borders.

38 |

In this example, each cell has a border-width of 4px. As a result, the border between two cells will be 8px.

39 | 40 |
41 |
42 | 43 | 49 | 50 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | border-collapse: collapse; 58 |

59 |
60 |

Adjacent table cells will merge their borders together.

61 |

The cell that appears first in the code will "win": its borders will mask those of the following cells.

62 | 63 |
64 |
65 | 66 | 72 | 73 | 74 |
75 | 76 |
77 | -------------------------------------------------------------------------------- /property/list-style-position/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: list-style-position 4 | --- 5 | 6 |
7 |
8 | 13 |

14 | #list-style-position 15 |

16 |
17 |

Defines the position of a list's bullet points.

18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |

31 | 默认属性 32 | 33 | 34 | list-style-position: outside; 35 |

36 |
37 |

The bullet point will be outside the list item, as if it wasn't part of the list item.

38 |

The start of each line of a list item will be aligned vertically.

39 | 40 |
41 |
42 | 43 | 49 | 50 | 51 |
52 |
53 |
54 |

55 | 56 | 57 | list-style-position: inside; 58 |

59 |
60 |

The bullet point will be inside the list item.

61 |

As it is part of the list item, it will be part of the text and push the text at the start.

62 | 63 |
64 |
65 | 66 | 72 | 73 | 74 |
75 | 76 |
77 | -------------------------------------------------------------------------------- /property/background-origin/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: background-origin 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #background-origin 18 |

19 |
20 |

Defines the origin of the background image.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |

35 | 默认属性 36 | 37 | 38 | background-origin: padding-box; 39 |

40 |
41 |

The background image starts at the edge of the border: within padding but not the border.

42 | 43 |
44 |
45 | 46 | 52 | 53 |
54 |
55 |
56 |

57 | 58 | 59 | background-origin: border-box; 60 |

61 |
62 |

The background image starts under the border.

63 | 64 |
65 |
66 | 67 | 73 | 74 |
75 |
76 |
77 |

78 | 79 | 80 | background-origin: content-box; 81 |

82 |
83 |

The background image only starts at the edge of the content: it doesn't include the padding, nor the border.

84 | 85 |
86 |
87 | 88 | 94 | 95 |
96 | 97 |
98 | -------------------------------------------------------------------------------- /property/background-position/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: background-position 4 | --- 5 | 6 |
7 |
8 | 16 |

17 | #background-position 18 |

19 |
20 |

Defines the position of the background image.

21 | 22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 |
33 |

34 | 默认属性 35 | 36 | 37 | background-position: 0% 0%; 38 |

39 |
40 |

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.

41 | 42 |
43 |
44 | 45 | 51 | 52 |
53 |
54 |
55 |

56 | 57 | 58 | background-position: bottom right; 59 |

60 |
61 |

You can use a combination of position keywords: center, top, bottom, left and right.

62 | 63 |
64 |
65 | 66 | 72 | 73 |
74 |
75 |
76 |

77 | 78 | 79 | background-position: center center; 80 |

81 |
82 |

The background image will be positioned in the center of the element.

83 | 84 |
85 |
86 | 87 | 93 | 94 |
95 | 96 |
97 | -------------------------------------------------------------------------------- /property/animation-play-state/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: single 3 | property_name: animation-play-state 4 | --- 5 | 6 |
7 |
8 | 17 |

18 | #animation-play-state 19 |

20 |
21 |

Defines if an animation is playing or not.

22 | 23 |
24 | 25 |
26 | 27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
37 |
38 |

39 | 默认属性 40 | 41 | 42 | animation-play-state: running; 43 |

44 |
45 |

If the animation-duration and animation-name are defined, the animation will start playing automatically.

46 | 47 |
48 |
49 | 50 | 56 | 57 |
58 |
59 |
60 |

61 | 62 | 63 | animation-play-state: paused; 64 |

65 |
66 |

The animation is set paused at the first keyframe.

67 |

This is different than having either no 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.

68 |

In this example, the square is visible by default, but the on the first keyframe of fadeAndMove, the opacity is set to 0. When paused, the animation will be "stuck" on this first keyframe, and will thus be invisible.

69 |

@keyframes fadeAndMove {
70 |   from {
71 |     opacity: 0;
72 |     transform: translateX(0);
73 |   }
74 |   to {
75 |     opacity: 0;
76 |     transform: translateX(100px);
77 |   }
78 | }

79 | 80 |
81 |
82 | 83 | 89 | 90 |
91 | 92 |
93 | --------------------------------------------------------------------------------