css实现电影卡片悬浮聚焦动画效果代码
代码语言:html
所属分类:悬停
代码描述:css实现电影卡片悬浮聚焦动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link href='https://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'>
<style>
*, *:before, *:after {
box-sizing: border-box;
position: relative;
}
html, body {
overflow: hidden;
height: 100%;
}
body {
font-family: 'Raleway', sans-serif;
color: white;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
background: url("//repo.bfw.wiki/bfwrepo/image/5fc1a6cf89551.png");
background-size: cover;
}
body:after {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.25)), to(rgba(0, 0, 0, 0)));
background: linear-gradient(to top, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0));
}
.background-image {
z-index: 1;
position: absolut.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0