css实现视频卡片悬浮视觉差异效果代码
代码语言:html
所属分类:视觉差异
代码描述:css实现视频卡片悬浮视觉差异效果代码,视频播放,悬浮出现边框并根据鼠标位置实现视觉差异立体倾斜效果。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@1,700&family=Montserrat:wght@200&family=Radley&display=swap");
body {
width: 100vw;
height: 100vh;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #aae5ee, #66d0e1);
background-repeat: no-repeat;
}
body .container {
display: flex;
perspective: 600px;
}
body .container .card {
width: 170px;
height: 300px;
background-color: rgba(255, 255, 255, 0.1);
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
border-radius: 8px;
background-image: linear-gradient(to bottom, transparent, rgba(38, 167, 186, 0.4));
background-size: cover;
background-position: 50% 50%;
color: #fff;
display: flex;
justify-content: center;
align-items: flex-end;
border: 1px solid white;
position: relative;
transform-style: preserve-3d;
transform-origin: 50% 50% -50px;
}
body .container .card:before {
content: "";
position: absolute;
top: -1px;
left: -1px;
width: 100%;
height: 100%;
border: 1px solid white;
border-radius: 8px;
transform-origin: center;
transition: 0.2s ease;.........完整代码请登录后点击上方下载按钮下载查看
网友评论0