css实现5种图片滤镜效果代码
代码语言:html
所属分类:其他
代码描述:css实现5种图片滤镜效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Lato:700");
* {
margin: 0;
box-sizing: border-box;
}
body {
background: #2f2f31;
height: 100vh;
overflow: hidden;
color: #f5f5f5;
line-height: 1.34;
}
.container {
width: 100%;
height: 100%;
}
.container img {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
-o-object-position: center;
object-position: center;
}
.all_label {
width: 32px;
aspect-ratio: 1;
border-radius: 12%;
position: absolute;
bottom: 12px;
right: 12px;
background-color: #fff;
box-shadow: 0 0 16px rgba(0,0,0,0.267);
z-index: 50;
cursor: pointer;
opacity: 0.4;
}
.all_label::after {
content: "•";
color: #f00;
font-weight: bold;
font-size: 1.6em;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.i {
opacity: 0;
position: absolute;
left: -100%;
pointer-events: none;
}
.filters {
width: 100%;
height: 100%;
position: absolute;
top: 0;
display: flex;
pointer-events: none;
}
.filters .l {
pointer-events: auto;
width: 0%;
height: 100%;
transition: width 0.6s cubic-bezier(0.1, 0.65, 0.1, 1);
position: relative;
cursor: default;
overflow: hidden;
}
.filters .f {
width: 100%;
height: 100%;
position: relative;
}
.filters .f::before,
.filters .f::after {
content: "";
position: absolute;
inset: 0;
z-index: 5;
}
.filters .s {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 5;
padding-top: 15px;
font-family: Lato;
font-size: 12px;
text-align: center;
text-transform: uppercase;
letter-spacing: 2px;
opacity: 0.75;
transitio.........完整代码请登录后点击上方下载按钮下载查看
网友评论0