svg+css实现清爽订单卡片效果代码
代码语言:html
所属分类:布局界面
代码描述:svg+css实现清爽订单卡片效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--clr--neutral--900: hsl(223, 50%, 9%);
--clr--neutral--800: hsl(223, 49%, 18%);
--clr--neutral--600: hsl(223, 47%, 23%);
--clr--primary--400: hsl(245, 75%, 52%);
--clr--neutral--300: hsl(224, 23%, 55%);
--clr--neutral--200: hsl(225, 100%, 98%);
--clr--neutral--100: hsl(0, 0%, 100%);
--clr--primary--Bblue: hsl(245, 75%, 52%);
--clr--primary--Pblue: hsl(225, 100%, 94%);
}
* {
margin: 0;
padding: 0;
font-family: "Red Hat Display", sans-serif;
box-sizing: border-box;
}
/*TYPOGRAPHY & BUTTONS*/
h1 {
font-size: 1.35rem;
font-weight: 900;
margin-bottom: 0.8em;
text-align: center;
color: var(--clr--neutral--900);
}
h3 {
color: var(--clr--neutral--900);
font-size: 1.25rem;
margin-bottom: 0.8em;
}
p {
color: var(--clr--neutral--300);
font-size: 1rem;
margin-bottom: 1.25em;
max-width: 17rem;
}
button {
height: 1.125rem;
}
body {
display: grid;
place-items: center;
width: 100%;
height: 100vh;
background: url(images/pattern-background-desktop.svg);
background-color: var(--clr--primary--Pblue);
background-repeat: no-repeat;
background-size: contain;
overflow-x: hidden;
}
main {
display: flex;
align-items: center;
justify-content: center;
width: 70%;
}
.summary-card {
display: flex;
flex-direction: column;
overflow: hidden;
padding: 1.5em 1.8em;
min-width: 375px;
width: 50%;
max-width: 33%;
border-radius: 20px;
background-color: var(--clr--neutral--100);
position: relative;
box-shadow: -5px 30px 25px 10px hsla(223, 32%, 71%, 0.3);
}
#head-svg {
position: absolute;
left: 0;
top: 0;
max-width: 100%;
margin-bottom: 1.5rem;
}
.order-info {
margin-top: 14rem;
}
.order-text {
display: grid;
place-items: center;
text-align: center;
}
.order-plan {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0.8rem 0;
width: 100%;
border-radius: 15px;
padding: 1.25em 1em;
background-color: var(--clr--neutral--200);
}
.order-details > * {
margin: 0;
padding: 0;
}
.order-details h4 {
font-size: 1rem;
font-weight: 700;
margin-bottom: 0.2em;
margin-right: 3em;
margin-left: 1.5em;
}
.order-details p {
margin-right: 3em;
margin-left: 1.5em;
font-style: italic;
}
.order-plan a {
font-weight: 600;
text-decoration: none;
margin-right: 0.25em;
}
.order-plan a:hover {
text-decoration: underline;
color: var(--clr--neutral--400);
}
.order-actions {
display: flex;
flex-direction: column;
}
.btn {
cursor: pointer;
height: 3em;
font-size: 1rem;
font-weight: 700;
text-decoration: none;
border: none;
border-radius: 12px;
margin: 0.25em 0;
}
.btn-primary {
background-col.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0