div+css布局实现课程卡片列表效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现课程卡片列表效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600&display=swap"); * { margin: 0; padding: 0; box-sizing: border-box; } body { min-height: 100vh; min-height: 100svh; background: #232228; font-family: "Nunito", sans-serif; position: relative; overflow-x: hidden; display: grid; place-items: center; } a { text-decoration: none; display: inline-block; } section { width: 100%; display: flex; justify-content: center; flex-wrap: wrap; max-width: 50em; margin-inline: auto; gap: 3.25rem; position: relative; z-index: 10; align-items: center; padding: 5em 0; } section .card { position: relative; z-index: 555; max-width: 20rem; min-height: 20rem; width: 90%; display: grid; place-content: center; place-items: center; text-align: center; position: relative; box-shadow: 1px 12px 25px rgba(0, 0, 0, 0.78); border-radius: 2.25rem; } section .card::before { position: absolute; content: ""; top: 0; width: 100%; height: 100%; border-radius: 2.25rem; z-index: -1; border: 0.155rem solid transparent; -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; } section .card-header { position: absolute; top: 0; left: 0; right: 0; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0.8em 0.5em 0em 1.5em; } section .card-header .date { color: #ddd; } section .card-header svg { color: #fff; width: 2.5rem; cursor: pointer; } section .card-body { position: absolute; width: 100%; display: block; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 0.7em 1.25em 0.5em 1.5em; } section .card-body h3 { color: #fff; font-size: 1.375rem; margin-top: 0.625em; margin-bottom: 0.188em; text-transform: capitalize; font-weight: 600; } section .card-body p { color: #ddd; font-size: 1rem; letter-spacing: 0.031rem; } section .card-body .progress { margin-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0