定价区块并排展示各个方案。每个方案依次展示名称、价格、适用对象、一个按钮和所含功能。只突出显示一个推荐方案。
定价
<section class="container-inline px-lg py-4xl" aria-labelledby="pricing-title"> <div class="flex flex-col gap-2xl max-w(1040) mx-auto"> <header class="flex flex-col items-center gap-sm text-center"> <p class="eyebrow">Pricing</p> <h2 class="heading heading-2xl" id="pricing-title">Free to start. Fair when you grow.</h2> <p class="lead max-w(480)"> Every plan deploys the same way. You pay for the team, not for the traffic. </p> </header> <div class="grid gap-md items-start grid-cols(3)@container(--4xl)"> <article class="sheet sheet-raised flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Hobby</h3> </div> <p class="price"> <span class="price-currency">$</span><span class="price-amount">0</span><span class="price-period">forever</span> </p> <p class="m(0) leading-md">For side projects and trying things out.</p> </header> <a class="btn" href="#">Start for free</a> <ul class="bullets bullets-check"> <li class="bullets-item">One project</li> <li class="bullets-item">Previews for every branch</li> <li class="bullets-item">Community support</li> </ul> </article> <article class="sheet flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Pro</h3> <span class="badge badge-ink badge-pill">Most popular</span> </div> <p class="price"> <span class="price-currency">$</span><span class="price-amount">20</span><span class="price-period">per member, monthly</span> </p> <p class="m(0) leading-md">For teams that ship to real visitors.</p> </header> <a class="btn btn-brand" href="#">Start a trial</a> <ul class="bullets bullets-check"> <li class="bullets-item">Unlimited projects</li> <li class="bullets-item">Fourteen regions</li> <li class="bullets-item">Analytics and firewall</li> <li class="bullets-item">Email support, next day</li> </ul> </article> <article class="sheet sheet-raised flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Enterprise</h3> </div> <p class="price"><span class="price-amount">Custom</span></p> <p class="m(0) leading-md">For organizations with their own rules.</p> </header> <a class="btn" href="#">Talk to sales</a> <ul class="bullets bullets-check"> <li class="bullets-item">Single sign-on and audit log</li> <li class="bullets-item">A 99.99% uptime agreement</li> <li class="bullets-item">A named engineer</li> <li class="bullets-item">Invoices and purchase orders</li> </ul> </article> </div> <p class="m(0) text-center text-xs fg-text-muted"> Prices are in US dollars and exclude tax. Cancel any time. </p> </div></section><section className="container-inline px-lg py-4xl" aria-labelledby="pricing-title"> <div className="flex flex-col gap-2xl max-w(1040) mx-auto"> <header className="flex flex-col items-center gap-sm text-center"> <p className="eyebrow">Pricing</p> <h2 className="heading heading-2xl" id="pricing-title">Free to start. Fair when you grow.</h2> <p className="lead max-w(480)"> Every plan deploys the same way. You pay for the team, not for the traffic. </p> </header> <div className="grid gap-md items-start grid-cols(3)@container(--4xl)"> <article className="sheet sheet-raised flex flex-col gap-lg p-lg"> <header className="flex flex-col gap-xs"> <div className="flex items-center justify-between gap-sm"> <h3 className="heading heading-sm">Hobby</h3> </div> <p className="price"> <span className="price-currency">$</span><span className="price-amount">0</span><span className="price-period">forever</span> </p> <p className="m(0) leading-md">For side projects and trying things out.</p> </header> <a className="btn" href="#">Start for free</a> <ul className="bullets bullets-check"> <li className="bullets-item">One project</li> <li className="bullets-item">Previews for every branch</li> <li className="bullets-item">Community support</li> </ul> </article> <article className="sheet flex flex-col gap-lg p-lg"> <header className="flex flex-col gap-xs"> <div className="flex items-center justify-between gap-sm"> <h3 className="heading heading-sm">Pro</h3> <span className="badge badge-ink badge-pill">Most popular</span> </div> <p className="price"> <span className="price-currency">$</span><span className="price-amount">20</span><span className="price-period">per member, monthly</span> </p> <p className="m(0) leading-md">For teams that ship to real visitors.</p> </header> <a className="btn btn-brand" href="#">Start a trial</a> <ul className="bullets bullets-check"> <li className="bullets-item">Unlimited projects</li> <li className="bullets-item">Fourteen regions</li> <li className="bullets-item">Analytics and firewall</li> <li className="bullets-item">Email support, next day</li> </ul> </article> <article className="sheet sheet-raised flex flex-col gap-lg p-lg"> <header className="flex flex-col gap-xs"> <div className="flex items-center justify-between gap-sm"> <h3 className="heading heading-sm">Enterprise</h3> </div> <p className="price"><span className="price-amount">Custom</span></p> <p className="m(0) leading-md">For organizations with their own rules.</p> </header> <a className="btn" href="#">Talk to sales</a> <ul className="bullets bullets-check"> <li className="bullets-item">Single sign-on and audit log</li> <li className="bullets-item">A 99.99% uptime agreement</li> <li className="bullets-item">A named engineer</li> <li className="bullets-item">Invoices and purchase orders</li> </ul> </article> </div> <p className="m(0) text-center text-xs fg-text-muted"> Prices are in US dollars and exclude tax. Cancel any time. </p> </div></section><section class="container-inline px-lg py-4xl" aria-labelledby="pricing-title"> <div class="flex flex-col gap-2xl max-w(1040) mx-auto"> <header class="flex flex-col items-center gap-sm text-center"> <p class="eyebrow">Pricing</p> <h2 class="heading heading-2xl" id="pricing-title">Free to start. Fair when you grow.</h2> <p class="lead max-w(480)"> Every plan deploys the same way. You pay for the team, not for the traffic. </p> </header> <div class="grid gap-md items-start grid-cols(3)@container(--4xl)"> <article class="sheet sheet-raised flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Hobby</h3> </div> <p class="price"> <span class="price-currency">$</span><span class="price-amount">0</span><span class="price-period">forever</span> </p> <p class="m(0) leading-md">For side projects and trying things out.</p> </header> <a class="btn" href="#">Start for free</a> <ul class="bullets bullets-check"> <li class="bullets-item">One project</li> <li class="bullets-item">Previews for every branch</li> <li class="bullets-item">Community support</li> </ul> </article> <article class="sheet flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Pro</h3> <span class="badge badge-ink badge-pill">Most popular</span> </div> <p class="price"> <span class="price-currency">$</span><span class="price-amount">20</span><span class="price-period">per member, monthly</span> </p> <p class="m(0) leading-md">For teams that ship to real visitors.</p> </header> <a class="btn btn-brand" href="#">Start a trial</a> <ul class="bullets bullets-check"> <li class="bullets-item">Unlimited projects</li> <li class="bullets-item">Fourteen regions</li> <li class="bullets-item">Analytics and firewall</li> <li class="bullets-item">Email support, next day</li> </ul> </article> <article class="sheet sheet-raised flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Enterprise</h3> </div> <p class="price"><span class="price-amount">Custom</span></p> <p class="m(0) leading-md">For organizations with their own rules.</p> </header> <a class="btn" href="#">Talk to sales</a> <ul class="bullets bullets-check"> <li class="bullets-item">Single sign-on and audit log</li> <li class="bullets-item">A 99.99% uptime agreement</li> <li class="bullets-item">A named engineer</li> <li class="bullets-item">Invoices and purchase orders</li> </ul> </article> </div> <p class="m(0) text-center text-xs fg-text-muted"> Prices are in US dollars and exclude tax. Cancel any time. </p> </div></section><template> <section class="container-inline px-lg py-4xl" aria-labelledby="pricing-title"> <div class="flex flex-col gap-2xl max-w(1040) mx-auto"> <header class="flex flex-col items-center gap-sm text-center"> <p class="eyebrow">Pricing</p> <h2 class="heading heading-2xl" id="pricing-title">Free to start. Fair when you grow.</h2> <p class="lead max-w(480)"> Every plan deploys the same way. You pay for the team, not for the traffic. </p> </header> <div class="grid gap-md items-start grid-cols(3)@container(--4xl)"> <article class="sheet sheet-raised flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Hobby</h3> </div> <p class="price"> <span class="price-currency">$</span><span class="price-amount">0</span><span class="price-period">forever</span> </p> <p class="m(0) leading-md">For side projects and trying things out.</p> </header> <a class="btn" href="#">Start for free</a> <ul class="bullets bullets-check"> <li class="bullets-item">One project</li> <li class="bullets-item">Previews for every branch</li> <li class="bullets-item">Community support</li> </ul> </article> <article class="sheet flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Pro</h3> <span class="badge badge-ink badge-pill">Most popular</span> </div> <p class="price"> <span class="price-currency">$</span><span class="price-amount">20</span><span class="price-period">per member, monthly</span> </p> <p class="m(0) leading-md">For teams that ship to real visitors.</p> </header> <a class="btn btn-brand" href="#">Start a trial</a> <ul class="bullets bullets-check"> <li class="bullets-item">Unlimited projects</li> <li class="bullets-item">Fourteen regions</li> <li class="bullets-item">Analytics and firewall</li> <li class="bullets-item">Email support, next day</li> </ul> </article> <article class="sheet sheet-raised flex flex-col gap-lg p-lg"> <header class="flex flex-col gap-xs"> <div class="flex items-center justify-between gap-sm"> <h3 class="heading heading-sm">Enterprise</h3> </div> <p class="price"><span class="price-amount">Custom</span></p> <p class="m(0) leading-md">For organizations with their own rules.</p> </header> <a class="btn" href="#">Talk to sales</a> <ul class="bullets bullets-check"> <li class="bullets-item">Single sign-on and audit log</li> <li class="bullets-item">A 99.99% uptime agreement</li> <li class="bullets-item">A named engineer</li> <li class="bullets-item">Invoices and purchase orders</li> </ul> </article> </div> <p class="m(0) text-center text-xs fg-text-muted"> Prices are in US dollars and exclude tax. Cancel any time. </p> </div> </section></template>区块提供可直接复制的标记,沿用页面的文字颜色和字号。预览在 body 上设置 fg-text-body text-sm。每个区块都是尺寸容器,按自身宽度重排。
#区块构成
- 网格中放置三个面板。 区块宽度小于 56rem 时使用单列,达到 56rem 时使用
grid-cols(3)@container(--4xl)。items-start让各方案的高度随各自的列表长度而定。 - 通过抬高面板突出推荐方案,面板沿用统一配色。 它在相邻的
sheet-raised之间使用默认层次的sheet,配有badge-ink和页面上唯一的btn-brand。层次、文字标签和唯一的彩色按钮构成三处低调的提示,无需彩色边框。 - 价格使用价格组件。金额用大号数字显示,小号货币符号与数字顶部对齐,计费周期以弱化的前景色显示在数字旁,与数字共用基线。
- 按钮放在功能列表之前。 已经选定方案的访客可以直接操作。
- 用带有
bullets-check的项目列表列出所含功能。每行前的对勾使用主要前景色,仅作装饰,文字本身就能表达完整含义。
按价格从低到高排列方案。如果某个方案适合几乎所有人,直接在该方案的描述中说明即可,无需增加第四个方案。
#方案对比
在方案下方用表格补充卡片难以呈现的对比信息,每项功能占一行,每个方案占一列。在窄屏上,表格可在面板内的滚动区域中横向滚动,仍有列可滚入时,对应边缘会渐隐。
方案对比
<section class="container-inline px-lg py-4xl" aria-labelledby="pricing-compare-title"> <div class="flex flex-col gap-xl max-w(880) mx-auto"> <h2 class="heading heading-xl" id="pricing-compare-title">Compare the plans</h2> <div class="sheet overflow-hidden"> <div class="scroll-area scroll-area-inline" tabindex="0" role="region" aria-labelledby="pricing-compare-title"> <table class="table"> <thead> <tr class="table-row"> <th class="table-heading" scope="col"><span class="sr-only">Feature</span></th> <th class="table-heading" scope="col">Hobby</th> <th class="table-heading" scope="col">Pro</th> <th class="table-heading" scope="col">Enterprise</th> </tr> </thead> <tbody> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Projects</th> <td class="table-cell">1</td> <td class="table-cell">Unlimited</td> <td class="table-cell">Unlimited</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Regions</th> <td class="table-cell">1</td> <td class="table-cell">14</td> <td class="table-cell">14</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Build minutes</th> <td class="table-cell">100 a month</td> <td class="table-cell">400 per member</td> <td class="table-cell">Custom</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Analytics</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5" /> </svg><span class="sr-only">Included</span> </td> <td class="table-cell"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5" /> </svg><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Firewall rules</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5" /> </svg><span class="sr-only">Included</span> </td> <td class="table-cell"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5" /> </svg><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Single sign-on</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> <path d="M3 8L6.3532 11.3532A0.2 0.2 0 0 0 6.6412 11.3479L13 4.5" /> </svg><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Uptime agreement</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell">99.99%</td> </tr> </tbody> </table> </div> </div> </div></section>import CheckIcon from '@master/icons-react/native/16/soft/check'<section className="container-inline px-lg py-4xl" aria-labelledby="pricing-compare-title"> <div className="flex flex-col gap-xl max-w(880) mx-auto"> <h2 className="heading heading-xl" id="pricing-compare-title">Compare the plans</h2> <div className="sheet overflow-hidden"> <div className="scroll-area scroll-area-inline" tabIndex={0} role="region" aria-labelledby="pricing-compare-title"> <table className="table"> <thead> <tr className="table-row"> <th className="table-heading" scope="col"> <span className="sr-only">Feature</span> </th> <th className="table-heading" scope="col">Hobby</th> <th className="table-heading" scope="col">Pro</th> <th className="table-heading" scope="col">Enterprise</th> </tr> </thead> <tbody> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Projects</th> <td className="table-cell">1</td> <td className="table-cell">Unlimited</td> <td className="table-cell">Unlimited</td> </tr> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Regions</th> <td className="table-cell">1</td> <td className="table-cell">14</td> <td className="table-cell">14</td> </tr> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Build minutes</th> <td className="table-cell">100 a month</td> <td className="table-cell">400 per member</td> <td className="table-cell">Custom</td> </tr> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Analytics</th> <td className="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span className="sr-only">Not included</span> </td> <td className="table-cell"> <CheckIcon className="icon" /><span className="sr-only">Included</span> </td> <td className="table-cell"> <CheckIcon className="icon" /><span className="sr-only">Included</span> </td> </tr> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Firewall rules</th> <td className="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span className="sr-only">Not included</span> </td> <td className="table-cell"> <CheckIcon className="icon" /><span className="sr-only">Included</span> </td> <td className="table-cell"> <CheckIcon className="icon" /><span className="sr-only">Included</span> </td> </tr> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Single sign-on</th> <td className="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span className="sr-only">Not included</span> </td> <td className="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span className="sr-only">Not included</span> </td> <td className="table-cell"> <CheckIcon className="icon" /><span className="sr-only">Included</span> </td> </tr> <tr className="table-row"> <th className="table-cell table-primary" scope="row">Uptime agreement</th> <td className="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span className="sr-only">Not included</span> </td> <td className="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span className="sr-only">Not included</span> </td> <td className="table-cell">99.99%</td> </tr> </tbody> </table> </div> </div> </div></section><script> import CheckIcon from '@master/icons-svelte/native/16/soft/check'</script><section class="container-inline px-lg py-4xl" aria-labelledby="pricing-compare-title"> <div class="flex flex-col gap-xl max-w(880) mx-auto"> <h2 class="heading heading-xl" id="pricing-compare-title">Compare the plans</h2> <div class="sheet overflow-hidden"> <div class="scroll-area scroll-area-inline" tabindex="0" role="region" aria-labelledby="pricing-compare-title"> <table class="table"> <thead> <tr class="table-row"> <th class="table-heading" scope="col"><span class="sr-only">Feature</span></th> <th class="table-heading" scope="col">Hobby</th> <th class="table-heading" scope="col">Pro</th> <th class="table-heading" scope="col">Enterprise</th> </tr> </thead> <tbody> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Projects</th> <td class="table-cell">1</td> <td class="table-cell">Unlimited</td> <td class="table-cell">Unlimited</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Regions</th> <td class="table-cell">1</td> <td class="table-cell">14</td> <td class="table-cell">14</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Build minutes</th> <td class="table-cell">100 a month</td> <td class="table-cell">400 per member</td> <td class="table-cell">Custom</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Analytics</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Firewall rules</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Single sign-on</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Uptime agreement</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell">99.99%</td> </tr> </tbody> </table> </div> </div> </div></section><script setup>import CheckIcon from '@master/icons-vue/native/16/soft/check'</script><template> <section class="container-inline px-lg py-4xl" aria-labelledby="pricing-compare-title"> <div class="flex flex-col gap-xl max-w(880) mx-auto"> <h2 class="heading heading-xl" id="pricing-compare-title">Compare the plans</h2> <div class="sheet overflow-hidden"> <div class="scroll-area scroll-area-inline" tabindex="0" role="region" aria-labelledby="pricing-compare-title"> <table class="table"> <thead> <tr class="table-row"> <th class="table-heading" scope="col"><span class="sr-only">Feature</span></th> <th class="table-heading" scope="col">Hobby</th> <th class="table-heading" scope="col">Pro</th> <th class="table-heading" scope="col">Enterprise</th> </tr> </thead> <tbody> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Projects</th> <td class="table-cell">1</td> <td class="table-cell">Unlimited</td> <td class="table-cell">Unlimited</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Regions</th> <td class="table-cell">1</td> <td class="table-cell">14</td> <td class="table-cell">14</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Build minutes</th> <td class="table-cell">100 a month</td> <td class="table-cell">400 per member</td> <td class="table-cell">Custom</td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Analytics</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Firewall rules</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Single sign-on</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell"> <CheckIcon class="icon" /><span class="sr-only">Included</span> </td> </tr> <tr class="table-row"> <th class="table-cell table-primary" scope="row">Uptime agreement</th> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell fg-text-muted"> <span aria-hidden="true">–</span><span class="sr-only">Not included</span> </td> <td class="table-cell">99.99%</td> </tr> </tbody> </table> </div> </div> </div> </section></template>对勾和短横线都对辅助技术隐藏,并分别配有视觉隐藏的文字“包含”和“不包含”。滚动区域设置 tabindex="0",以标题作为无障碍名称,并支持键盘滚动。
#无障碍
- 每个方案使用一个
<article>,方案名称用<h3>标记,位于区块的<h2>下。 - 徽标用“最受欢迎”明确标出推荐方案,让位置和层次之外也有文字提示。
- 表格每行的首个单元格使用
<th scope="row">,这样朗读某个单元格时,会同时读出对应的功能和方案。 - 标价时写明计费周期。仅写“$20”无法表达完整价格。