css布局实现折叠纸张文字列表背景效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现折叠纸张文字列表背景效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> /* VARIABLES */ /* BASE STYLES */ body { color: #1f4e5f; font: 400 100%/1.4 "Lato", sans-serif; background-image: radial-gradient(#1f4e5f 10%, #79a8a9 100%); background-size: 2000px 2000px; background-position: center; } .flex { position: relative; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; } .heading { color: #f4f7f7; font-size: 1rem; padding-bottom: 2rem; text-transform: uppercase; opacity: 0.85; } /* THE LIST ITSELF */ .list { font-size: 1.15rem; } .list__item { position: relative; padding: 1.5em; line-height: 1; perspective: 150px; background-color: #f4f7f7; white-space: nowrap; } .list__item::before, .list__item::after { position: absolute; top: 0; display: block; height: 0; width: 0; content: ""; border: 0 solid transparent; } .list__item::after { right: 0; } .list__item::before { left: 0; } .list__item:nth-child(even) { background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, transparent 100%); } .list__item:nth-child(even)::before, .list__item:nth-child(even)::after { border-top-color: #1f4e5f; border-top-width: 4em; } .list__item:nth-child(even)::before { border-right-width: 5px; } .list__item:nth-child(even)::after { border-left-width: 5px; } .list__item:nth-child(odd) { background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.15) 100%); } .list.........完整代码请登录后点击上方下载按钮下载查看
网友评论0