Home

recent posts

Simple Design Audio Player using HTML and CSS

Simple create Audio Player using HTML and CSS

Learn How to make a Audio Player using HTML and CSS. latest Audio Player UI design with HTML and CSS. Web site Design Tutorial

Video Tutorial

For Download the Background image Click Here

How to use the code in stpe by step

  1. Open Your text Editor(like: VS code, SublimeText or Notepad++)
  2. Create a .html(like: index.html) file
  3. Copy the HTML code the code and past in the index.html file
  4. Then, Create a .css(like: style.css) file
  5. Copy the CSS code and past in style.css file
  6. Open the file in your browser

HTML CODE

HTML is a standard language for web page. With HTML you can create your own website. HTML is easy to learn - You will enjoy it


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Music Player</title>

    <link rel="stylesheet" href="style.css">
</head>
<body>
    <din class="cointainer">
        <div class="player">
            <div class="img-box">
                <img src="./images.jpg" alt="Music">
            </div>

            <h5>Song Name</h5>
            <audio controls>
                <source src="./audio.mp3" type="audio/mp3"> 
            </audio>
        </div>
    </din>
</body>
</html>


CSS CODE

The Full from of CSS is Cascading Style Sheets. It explains how to show HTML elemnts on display. For web designers, it is powerfull tool to adjust the design and control of the web pages t demonstrate how they should be viewed.

  
  
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    width: 100%;
    height: 100vh;
    background: url(./bg2.jpg) no-repeat;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cointainer{
    width: 320px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 10px;
}

.player{
    position: relative;
    width: 250px;
}

.player .img-box img{
    position: relative;
    width: 100%;
    height: 300px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.player h5{
    color: #fff;
    position: absolute;
    bottom: 65px;
    z-index: 1;
    animation: floattext 2.5s infinite alternate ease-in-out;
}

@keyframes floattext {
    from{
        left: 0;
    }
    to{
        left: 72%;
    }
    
}

.player audio{
    width: 100%;
    outline: none;
    background: #f1f3f4;
}

No comments:

top navigation

Powered by Blogger.