| 1 | <!DOCTYPE html> |
| 2 | <html lang="zh-CN"><head><meta charset="utf-8"><title>Image + Text</title> |
| 3 | <link rel="stylesheet" href="../../assets/fonts.css"> |
| 4 | <link rel="stylesheet" href="../../assets/base.css"> |
| 5 | <link rel="stylesheet" id="theme-link" href="../../assets/themes/minimal-white.css"> |
| 6 | <link rel="stylesheet" href="../../assets/animations/animations.css"> |
| 7 | <style> |
| 8 | .split{display:grid;grid-template-columns:1fr 1fr;gap:56px;margin-top:18px;flex:1;min-height:0} |
| 9 | .split.flip > .col-img{order:2} |
| 10 | .split > div{display:flex;flex-direction:column;justify-content:center;min-height:0} |
| 11 | /* Height first, width follows the ratio. A tall image can then never push past |
| 12 | the slide's padding box, whatever its natural aspect ratio is. */ |
| 13 | .split .img-frame{--img-ratio:4/5;height:100%;width:auto;max-width:100%;align-self:center} |
| 14 | .split ul{margin:18px 0 0;padding-left:20px} |
| 15 | .split li{margin:10px 0;color:var(--text-2);font-size:19px} |
| 16 | </style> |
| 17 | </head><body class="single"> |
| 18 | <div class="deck"><section class="slide is-active" data-title="Image + Text"> |
| 19 | <div class="split"> |
| 20 | <div class="col-img anim-fade-right" data-anim="fade-right"> |
| 21 | <figure class="img-frame"> |
| 22 | <img src="../../assets/demo-images/photo-portrait.svg" alt="产品实拍"> |
| 23 | <span class="img-tag">Product</span> |
| 24 | </figure> |
| 25 | </div> |
| 26 | <div class="col-text"> |
| 27 | <p class="kicker">Product · 03</p> |
| 28 | <h2 class="h2">左图右文,最常用的一页</h2> |
| 29 | <ul class="anim-stagger-list" data-anim-target> |
| 30 | <li>图占一半,说明占一半 —— 视觉与论述各不抢戏</li> |
| 31 | <li>竖图、方图、横图都能放:框决定比例,图自己 <code>cover</code></li> |
| 32 | <li>想把图放右边:给 <code>.split</code> 加 <code>flip</code></li> |
| 33 | </ul> |
| 34 | </div> |
| 35 | </div> |
| 36 | <div class="notes">图文各半。框比例由 <code>--img-ratio</code> 控制,这里用 4/5 竖构图;图片换成横图也不会破版。</div> |
| 37 | </section></div> |
| 38 | <script src="../../assets/runtime.js"></script> |
| 39 | </body></html> |
| 40 |