Custom Animated Border Video Player Custom Animated Border Video Player

Custom Animated Border Video Player

Welcome to my blog! Today, I'm excited to share a unique video player with a stunning animated border. This video player stands out due to its eye-catching border that dynamically changes color and rotates, creating a mesmerizing visual effect. Below is the code and an embedded example of this video player:

Example Video Player

Pros of This Video Player

  • Visually Appealing: The animated border with gradient colors makes the video player stand out, providing a unique and engaging experience for viewers.
  • Customizable: The CSS code can be easily modified to change the colors, animation speed, and other properties to match your website's design.
  • Modern Look: The conic-gradient and keyframes animations give the player a modern and stylish appearance, enhancing the overall aesthetic of your site.
  • Responsive Design: The video player is designed to be responsive, ensuring it looks great on different devices and screen sizes.

I hope you find this video player as exciting as I do! Feel free to use and modify the code to suit your needs. Happy coding!

Source Code- HTML and CSS Code



<video id="videoPlayer" class="video-player" src='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4' controls>

    Your browser does not support the video tag.

</video>

<style>

#videoPlayer {

  height:300px;

  width:500px;

  display: grid;

  place-content: center;

  color: white;

  text-shadow: 0 1px 0 #000;

  --border-angle: 0turn;

  --main-bg: conic-gradient(

    from var(--border-angle),

    #213,

    #112 5%,

    #112 60%,

    #213 95%

  );

  border: solid 5px transparent;

  border-radius:0.5em;

  --gradient-border: conic-gradient(

    from var(--border-angle),

    transparent 25%,

    #08f,

    #f03 99%,

    transparent

  );

  background: var(--main-bg) padding-box, var(--gradient-border) border-box, var(--main-bg) border-box;

  background-position: center center;

  -webkit-animation: bg-spin 3s linear infinite;

          animation: bg-spin 3s linear infinite;

}

@-webkit-keyframes bg-spin {

  to {

    --border-angle: 1turn;

  }

}

@keyframes bg-spin {

  to {

    --border-angle: 1turn;

  }

}

@property --border-angle {

  syntax: "<angle>";

  inherits: true;

  initial-value: 0turn;

}

</style>

        

Video player tags-

HTML5 video player custom controls CodePen, Custom html5 video player codepen, Custom html5 video player online, Custom html5 video player free, Custom video player html CSS CodePen, Custom html5 video player github, Custom html5 video player download, Custom html5 video player javascript