CSS <time-percentage> Data Type
The <time-percentage> data type is a value that can be either a <time>, such as 2s, or a <percentage> that resolves to a time.
Description
The <time-percentage> CSS data type represents a value that can be either a <time>, such as 2s or 300ms, or a <percentage>, such as 50%. Where it is allowed, a percentage resolves to a time relative to some reference duration defined by the property, and the two kinds of value can be combined in calc(), for example calc(50% + 1s).
Like <length-percentage> and <angle-percentage>, this combined type exists mainly to keep property definitions short in the specifications. It is defined in CSS Values and Units Module Level 4 for use by properties where a duration can sensibly be expressed relative to another duration.
In practice, no property supported by current browsers accepts a <time-percentage>. The familiar timing properties, such as transition-duration and animation-delay, accept only <time> values. Percentages do appear in animations, but in different places: keyframe selectors such as 50% { ... } and the offsets of animation-range are percentages of the animation's progress or timeline, not <time-percentage> values.
Example syntax:
/* Valid <time-percentage> values */
2s
250ms
50%
calc(50% + 0.5s)
/* Percentages in animations are a different thing: keyframe offsets */
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.4; }
100% { opacity: 1; }
}
Syntax
<time-percentage> = <time> | <percentage>
Values
- <time>Refer to <time> for possible values.
- <percentage>Refer to <percentage> for possible values. It resolves to a time relative to a reference duration defined by the property.
Example
Browser Support
The following information will show you the current browser support for the CSS time-percentage data type. Hover over a browser icon to see the version that first introduced support for this CSS data type.
Desktop





Tablets & Mobile





