css实现向下滚动网页文字填充式动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css实现向下滚动网页文字填充式动画效果代码,仅支持chorme浏览器。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--bg: hsl(0 0% 2%);
--color: hsl(0 0% 100% / 0.1);
--underline-width: 1lh;
--underline-block-width: 200vmax;
--underline-color: hsl(0 0% 50% / 0.05);
--underline-transition: 5s;
--finish-fill: hsl(0 0% 100%);
--accent: hsl(0 0% 100%);
--fill: hsl(0 0% 50%);
}
body {
align-items: center;
background-color: var(--bg);
color: var(--color);
display: flex;
font-family: sans-serif;
font-weight: bold;
justify-content: center;
min-height: 200vh;
accent-color: red;
}
:root:has(#driver:checked) section {
outline: 1rem dashed hsl(0 80% 50% / 0.5);
background: hsl(0 80% 50% / 0.1);
}
.controls {
position: fixed;
top: 1rem;
right: 1rem;
padding: 1rem 2rem;
border-radius: 100px;
z-index: 2;
display: flex;
align-items: center;
gap: 0.5rem;
background: hsl(0 0% 90%);
color: hsl(0 0% 10%);
}
p {
width: 50vw;
resize: both;
max-width: 100vw;
overflow: hidden;
position: fixed;
pad.........完整代码请登录后点击上方下载按钮下载查看
网友评论0