Favorites

CSS <time-percentage> Data Type

<time-percentage>
CSS Data TypeThis data type is not supported by modern browsers.
Updated 21st November 2026

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.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

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

<div class="wrap">
<h1>CSS &lt;time-percentage&gt; examples</h1>
<div class="grid">
<div class="card">
<div class="track"><span class="ball"></span></div>
<div class="label">animation-duration: 3s with keyframes at 0%, 50%, 100%</div>
</div>
</div>
<p class="note">&lt;time-percentage&gt; is not accepted by any browser property yet.</p>
</div>
/* Base demo layout */
* { box-sizing: border-box; }

body {
  margin: 24px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: #f5f7fb;
  color: #102a43;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
}

h1 {
  font-size: 20px;
  margin: 0 0 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
}

.label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  color: #486581;
  margin-top: 10px;
  word-break: break-word;
}

.note {
  font-size: 13px;
  color: #486581;
  margin-top: 14px;
}

/*  examples */
/* No browser property accepts , so this demo shows
   a 
Open in editor

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.

This data type is not supported by modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.