{"id":17291207,"url":"https://github.com/l-hammer/flexbox","last_synced_at":"2025-03-26T18:46:04.517Z","repository":{"id":98049310,"uuid":"129186402","full_name":"l-hammer/Flexbox","owner":"l-hammer","description":"A Visual Guide to CSS3 Flexbox Properties~","archived":false,"fork":false,"pushed_at":"2022-07-24T13:30:24.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T00:26:31.905Z","etag":null,"topics":["css","flex","flex-layout","flexbox"],"latest_commit_sha":null,"homepage":"https://lhammer.cn/Flexbox","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l-hammer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-12T03:17:56.000Z","updated_at":"2022-07-24T13:32:08.000Z","dependencies_parsed_at":"2023-03-13T16:07:17.877Z","dependency_job_id":null,"html_url":"https://github.com/l-hammer/Flexbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l-hammer%2FFlexbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l-hammer%2FFlexbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l-hammer%2FFlexbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l-hammer%2FFlexbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l-hammer","download_url":"https://codeload.github.com/l-hammer/Flexbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245717870,"owners_count":20661150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","flex","flex-layout","flexbox"],"created_at":"2024-10-15T10:40:21.647Z","updated_at":"2025-03-26T18:46:04.509Z","avatar_url":"https://github.com/l-hammer.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"本文档Fork自[xluos/flexbox](https://github.com/xluos/demo/tree/gh-pages/flexbox)\n\n# Flexbox演示站 [地址](https://l-hammer.github.io/Flexbox/)\n\n可以通过动态的点击flexbox属性可以实时看到各个属性的效果，有助于理解各个属性。\n\n友好的提示，鼠标放在选项上面悬停显示各个属性效果。\n\n# Flexbox布局各种属性速查表\n\n# 容器属性\n\n## `flex-direction`主轴方向\n+ `row`（默认值）：主轴为水平方向，起点在左端。\n+ `row-reverse`：主轴为水平方向，起点在右端。\n+ `column`：主轴为垂直方向，起点在上沿。\n+ `column-reverse`：主轴为垂直方向，起点在下沿。\n## `flex-wrap`轴线是否换行\n+ `nowrap`（默认）：不换行\n+ `wrap` : 换行，第一行在上方\n+ `wrap-reverse` : 换行，第一行在下方\n## `flex-flow`前两个属性的简写形式，默认值为`row` `nowrap`\n## `justify-content`: 定义了项目在主轴上的对齐方式\n+ `flex-start`（默认值）：左对齐\n+ `flex-end`：右对齐\n+ `center`： 居中\n+ `space-between`：两端对齐，项目之间的间隔都相等。\n+ `space-around`：每个项目两侧的间隔相等。所以，项目之间的间隔比项目与边框的间隔大一倍。\n## `align-items`: 定义项目在交叉轴上如何对齐。\n+ `flex-start`：交叉轴的起点对齐。\n+ `flex-end`：交叉轴的终点对齐。\n+ `center`：交叉轴的中点对齐。\n+ `baseline`: 项目的第一行文字的基线对齐。\n+ `stretch`（默认值）：如果项目未设置高度或设为auto，将占满整个容器的高度。\n## `align-content`属性定义了多根轴线的对齐方式。如果项目只有一根轴线，该属性不起作用\n+ `flex-start`：与交叉轴的起点对齐。\n+ `flex-end`：与交叉轴的终点对齐。\n+ `center`：与交叉轴的中点对齐。\n+ `space-between`：与交叉轴两端对齐，轴线之间的间隔平均分布。\n+ `space-around`：每根轴线两侧的间隔都相等。所以，轴线之间的间隔比轴线与边框的间隔大一倍。\n+ `stretch`（默认值）：轴线占满整个交叉轴。\n# 项目属性\n\n## `order`属性定义项目的排列顺序。数值越小，排列越靠前，默认为0\n## `flex-grow`属性定义项目的放大比例，默认为0，即如果存在剩余空间，也不放大。剩余空间分配的比例是项目这个元素占总值的比例\n## `flex-shrink`属性定义了项目的缩小比例，默认为1，即如果空间不足，该项目将缩小，于上一个相同，空间不足时按所占的比例缩小\n## `flex-basis`属性定义了在分配多余空间之前，项目占据的主轴空间。它决定主轴的大小浏览器根据这个属性来判断主轴还有多少剩余空间，默认auto\n## `flex`属性是`flex-grow`, `flex-shrink` 和 `flex-basis`的简写，默认值为`0 1 auto`。该属性有两个快捷值：`auto (1 1 auto)` 和 `none (0 0 auto)`\n## `align-self`允许不一样的对齐方式，可覆盖`align-items`属性。默认值为`auto`继承父元素的`align-items`属性\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl-hammer%2Fflexbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl-hammer%2Fflexbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl-hammer%2Fflexbox/lists"}