div+css实现手风琴响应式折叠文字效果代码
代码语言:html
所属分类:响应式
代码描述:div+css实现手风琴响应式折叠文字效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
.ui-blinds {
--ui-blinds-bg: hsl(298, 35%, 37%), hsl(226, 35%, 45%), hsl(129, 35%, 45%), hsl(57, 85%, 50%), hsl(31, 75%, 50%), hsl(3, 65%, 50%);
--ui-blinds-c: white, white, black, black, black, white;
--ui-blinds-items: 6;
--ui-blinds-pb: 1ch;
--ui-blinds-pi: 2ch;
--_i: 0;
container-type: inline-size;
& ul {
all: unset;
clip-path: inset(0% 0% 0% 0% round var(--ui-blinds-bdrs, 0.5em));
display: grid;
& li {
background: linear-gradient(
var(--ui-blinds-bg)) no-repeat 0 calc(var(--_i) * 100% /
(var(--ui-blinds-items) - 1)) / 100% calc(1px * infinity);
list-style: none;
padding: var(--ui-blinds-pb) var(--ui-blinds-pi);
&:nth-of-type(2) { --_i: 1; }
&:nth-of-type(3) { --_i: 2; }
&:nth-of-type(4) { --_i: 3; }
&:nth-of-type(5) { --_i: 4; }
&:nth-of-type(6) { --_i: 5; }
& > * {
background: linear-gradient(
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0