Skip to content
Related Articles

Related Articles

Improve Article

CSS pause-before Property

  • Last Updated : 01 Oct, 2020

The CSS pause-before property is used to define the pause time before the element. This property can be seen as the speech media equivalent to the margin-top property in visual media.

Syntax:

pause-before: time | percentage;

Parameters: This property accepts two parameters as mentioned above and described below:

  • time: This parameter holds a value that pause will be the length of the value specified.
  • percentage: The length of the pause is depended on the value of speech-rate. If it is set to pause-before: 50% that would yield 250ms.

Example 1:

HTML






<!DOCTYPE html>
<html>
    <head>
        <style>
            audio {
                 pause-before : 20ms;
            }
        </style>
    </head>
    <body style="text-align: center;">
        <h1 style="color: green;">GeeksforGeeks</h1>
          
<p>CSS pause-before Property</p>
  
        <audio controls> 
        <source src
        type="audio/mp3"
    </audio
    </body>
</html>

Output:

Example 2:

HTML




<!DOCTYPE html>
<html>
    <head>
        <style>
            audio {
                 pause-before : 25%;
            }
        </style>
    </head>
    <body style="text-align: center;">
        <h1 style="color: green;">GeeksforGeeks</h1>
          
<p>CSS pause-before Property</p>
  
        <audio controls> 
        <source src
        type="audio/mp3"
    </audio
    </body>
</html>

Output:

Supported Browsers: This property is deprecated in CSS3 so the major browsers are not supported by this property




My Personal Notes arrow_drop_up
Recommended Articles
Page :