文字错位动画遮罩效果
代码语言:html
所属分类:动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
html, body {
width: 100%;
height: 100%;
}
body {
display: flex;
align-items: center;
justify-content: center;
background-color: black;
color: black;
font-family: neue-haas-grotesk-display, "Helvetica Neue", Helvetica, sans-serif;
font-weight: 600;
font-style: normal;
font-size: 21px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-display: block;
}
.container {
position: relative;
width: 716px;
height: 1008px;
visibility: hidden;
background: red;
cursor: pointer;
}
.jam {
position: absolute;
z-index: 0;
top: 0;
left: 0;
width: 716px;
height: 1008;
fill: red;
}
.content {
position: relative;
z-index: 2;
width: 716px;
height: 100%;
text-align: right;
padding: 82px 40px;
}
.content p {
margin: 0 0 48px;
letter-spacing: 0.5px;
line-height: 1.3;
}
.content span {
display: block;
}
.band {
color: black;
font-family: neue-haas-grotesk-display, "Helvetica Neue", Helvetica, sans-serif;
font-size: 21px;
font-weight: 600;
margin: 0 0 51px;
letter-spacing: 0.5px;
line-height: 1.3;
}
.guests {
align-self: flex-end;
position: absolute;
right: 40px;
bottom: 24px;
}
</style>
</head>
<body translate="no">
<div class="container">
<svg class="jam" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 716 1008">
<defs>
<mask id="jm-mask">
<rect width="100%" height="100%" fill="#fff" x="0" y="0" />
<path transform="translate(-14.18 394)" class="jm" fill="#000" d="M58.032,583.856 C91.884,583.856 120.9,576.602 142.662,557.258 C161.2,540.332 173.29,513.734 173.29,464.568 L173.29,11.596 L70.928,11.596 L70.928,460.538 C70.928,491.166 57.226,501.644 30.628,503.256 C22.568,504.062 13.702,503.256 4.03,503.256 L-1.13686838e-13,503.256 L-1.13686838e-13,578.214.........完整代码请登录后点击上方下载按钮下载查看
网友评论0