blob: f7150ed6e3382b78cb1b3c56e3a8b91f3c561617 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
---
title: <time-percentage>
slug: Web/CSS/time-percentage
tags:
- 值
- 单位
- 层叠样式表
translation_of: Web/CSS/time-percentage
---
<div>{{CSSRef}}</div>
<p><a href="/en-US/docs/Web/CSS/CSS_Types">CSS数据类型</a><code><time-percentage> 的值</code>可以表示为时间或百分比。</p>
<h2 id="Syntax">Syntax</h2>
<p>有关此类型允许的各个语法的详细信息,请参阅{{Cssxref("time")}}和{{Cssxref("percentage")}}的文档。</p>
<h2 id="Use_in_calc()">Use in calc()</h2>
<p>如果将<code><time percentage></code>指定为允许的类型,这意味着该百分比解析为时间,因此可以在{{Cssxref("calc()")}}表达式中使用。</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('CSS4 Values', '#mixed-percentages', '<time-percentage>')}}</td>
<td>{{Spec2('CSS4 Values')}}</td>
<td> </td>
</tr>
<tr>
<td>{{SpecName('CSS3 Values', '#mixed-percentages', '<time-percentage>')}}</td>
<td>{{Spec2('CSS3 Values')}}</td>
<td>Defines <code><time-percentage></code>. Adds <code>calc()</code></td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{Compat("css.types.time-percentage")}}</p>
|