Open In App

CSS elevation Property

The CSS elevation property is used to set the sound source on the vertical axis depending on the listener’s environment.

 Syntax:



elevation: angle:

Parameters: This property accepts single value as mentioned above and described below:

above = 90deg
level = 0deg
below = -90deg
higher = shifted upwards by 10deg compare to initial(0deg)
lower = shifted downwards by 10deg compare to initial(0deg)

Example 1:






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

Output:

Example 2:




<!DOCTYPE html>
<html>
  
<head>
    <style>
        audio {
            elevation: below;
        }
    </style>
</head>
  
<body style="text-align: center;">
    <h1 style="color: green;">
        GeeksforGeeks
    </h1>
  
    <p>CSS elevation 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


Article Tags :