js+css实现video视频右下角悬浮播放切换代码

代码语言:html

所属分类:多媒体

代码描述:js+css实现video视频右下角悬浮播放切换代码,让您在多任务处理时也能轻松观看视频内容。

代码标签: js css video 视频 右下角 悬浮 播放 切换 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.min.css">
   <style>
       * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif
}

body {
    background: linear-gradient(135deg,#1a2a6c,#b21f1f,#fdbb2d);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,#4a90e2,#fc0,#e74c3c)
}

h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
    background: linear-gradient(90deg,#fff,#fc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700
}

.subtitle {
    font-size: 1.3rem;
    opacity: .9;
    max-width: 700px;
    margin: 0 auto;
    color: #e0e0e0
}

.video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px
}

.main-video {
    width: 100%;
    max-width: 900px;
    background: rgba(0,0,0,0.4);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: all .5s ease;
    border: 1px solid rgba(255,255,255,0.1)
}

.main-video video {
    width: 100%;
    display: block;
    border-radius: 2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0