Create a Custom Audio Player

 




HTML code:-


<!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">
    <link rel="stylesheet" href="player.css">
    <title>Document</title>
</head>
<body>
    <div class="player">
        <div class="img">
            <img src="Background.jpg" alt="">
        </div>
        <audio controls>
            <source src="music.mp3" type="audio/mp3 ">
        </audio>
    </div>
</body>
</html>


CSS code:-

*{

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body{

    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: url(Background.jpg);
    background-size: cover;
    background-position: center;

}

.player{

    position: relative;
    width: 300px;
    height: 455px;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 20px 0 50px 80px rgba(red, green, blue, 0.377);
    border-radius: 10% 10% 5% 5%;

}
.player .img{

    position: relative;
    width: 100%;
    height: 400px;

}

.player .img img{

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10% 10% 0 0;

}



channel link :- https://www.youtube.com/channel/UC1DFWpD1k1PtxIzYbdBAj6g 

Add your comment 

Signature :- Ayoub Shindi (Dev AAS).

Comments