reference
example
| <!DOCTYPE html> |
| <html> |
| |
| <head> |
| <meta charset="utf-8"> |
| <title>Flexbox 1 — basic flexbox model chosen</title> |
| <style> |
| html { |
| font-family: sans-serif; |
| } |
| |
| body { |
| margin: 0; |
| } |
| |
| header { |
| background: purple; |
| height: 100px; |
| } |
| |
| h1 { |
| text-align: center; |
| color: white; |
| line-height: 100px; |
| margin: 0; |
| } |
| |
| |
| |
| article { |
| padding: 10px; |
| margin: 1px; |
| background: aqua; |
| flex: 1 200px; |
| } |
| |
| article * { |
| border: dotted 3px; |
| } |
| |
| article::before { |
| content: "@ruleBox(200px)(flex:1)"; |
| border: solid 1px; |
| width: 200px; |
| |
| display: flex; |
| justify-content: space-evenly; |
| |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| article>div { |
| border: dotted 2px hotpink; |
| display: fle; |
| } |
| |
| article>div>p:first-child { |
| background-color: blue; |
| } |
| |
| article>div>p:first-child, |
| .growSpaceBlock { |
| margin: initial; |
| height: 5px; |
| margin-left: 200px; |
| background-color: hotpink; |
| |
| } |
| |
| article>div>div { |
| margin: 0 0 0 200px; |
| color: red; |
| |
| } |
| |
| .growSpaceBlockInline { |
| |
| margin: 0 0 0 200px; |
| |
| display: inline-block; |
| } |
| |
| article:nth-of-type(3)::before { |
| content: "@ruleBox(200px)(flex:2)"; |
| } |
| |
| |
| |
| article:nth-of-type(3) { |
| flex: 2; |
| } |
| |
| article:nth-of-type(3) { |
| flex: 2 200px; |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| section { |
| display: flex; |
| } |
| </style> |
| </head> |
| |
| <body> |
| <header> |
| <h1>flex-grow Demo:Sample flexbox example</h1> |
| </header> |
| |
| <section> |
| <article> |
| <div> |
| <p class="growSpaceBlock"></p> |
| |
| |
| |
| |
| <h2>First article</h2> |
| |
| <p>Tacos actually microdosing, pour-over semiotics banjo chicharrones retro fanny pack portland everyday |
| carry vinyl typewriter. Tacos PBR&B pork belly, everyday carry ennui pickled sriracha normcore |
| hashtag |
| polaroid single-origin coffee cold-pressed. PBR&B tattooed trust fund twee, leggings salvia iPhone |
| photo |
| booth health goth gastropub hammock.</p> |
| </div> |
| </article> |
| |
| <article> |
| <div> |
| <p></p> |
| <h2>Second article</h2> |
| |
| <p>Tacos actually microdosing, pour-over semiotics banjo chicharrones retro fanny pack portland everyday |
| carry vinyl typewriter. Tacos PBR&B pork belly, everyday carry ennui pickled sriracha normcore |
| hashtag |
| polaroid single-origin coffee cold-pressed. PBR&B tattooed trust fund twee, leggings salvia iPhone |
| photo |
| booth health goth gastropub hammock.</p> |
| </div> |
| </article> |
| |
| <article> |
| <div> |
| <p></p> |
| <h2>Third article</h2> |
| |
| <p>Tacos actually microdosing, pour-over semiotics banjo chicharrones retro fanny pack portland everyday |
| carry vinyl typewriter. Tacos PBR&B pork belly, everyday carry ennui pickled sriracha normcore |
| hashtag |
| polaroid single-origin coffee cold-pressed. PBR&B tattooed trust fund twee, leggings salvia iPhone |
| photo |
| booth health goth gastropub hammock.</p> |
| |
| <p>Cray food truck brunch, XOXO +1 keffiyeh pickled chambray waistcoat ennui. Organic small batch paleo |
| 8-bit. Intelligentsia umami wayfarers pickled, asymmetrical kombucha letterpress kitsch leggings |
| cold-pressed squid chartreuse put a bird on it. Listicle pickled man bun cornhole heirloom art |
| party. |
| </p> |
| </div> |
| </article> |
| </section> |
| </body> |
| |
| </html> |
preview
- 下面的图中有三个
article
- grow系数的比例体现在红色长度的部分

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
2023-09-22 css_transform_skew()中的角度问题_动画演示角度变化
2023-09-22 PT@古典概型@等概率模型@P1
2023-09-22 PT@Bernoulli概型@古典概型之伯努利概型
2022-09-22 windows10_北京时间设置UTC+08:00)
2021-09-22 python/javaScript_数制进制转换base conversion problem