svg+css实现10款不同风格的流程图代码
代码语言:html
所属分类:图表
代码描述:svg+css实现10款不同风格的流程图代码
代码标签: svg css 10款 不同 风格 流程图 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>10款大气好看的HTML流程图合集</title>
<style>
/* 全局基础样式 */
:root {
--primary: #4f46e5;
--secondary: #ec4899;
--bg-color: #f3f4f6;
--text-color: #1f2937;
}
body {
font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
margin: 0;
padding: 20px;
}
h1 { text-align: center; margin-bottom: 40px; color: #333; }
h2 { margin-bottom: 15px; color: #555; border-bottom: 2px solid #ddd; padding-bottom: 10px; }
/* 容器样式,用于分隔不同案例 */
.demo-container {
background: #fff;
padding: 30px;
margin-bottom: 50px;
border-radius: 12px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
overflow-x: auto;
}
/* =========================================
1. 现代渐变箭头式 (CSS Clip-path)
========================================= */
.flow-1 {
display: flex;
gap: 10px;
flex-wrap: wrap;
}
.flow-1-step {
position: relative;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 15px 30px 15px 40px;
clip-path: polygon(90% 0, 100% 50%, 90% 100%, 0% 100%, 10% 50%, 0% 0%);
font-weight: bold;
transition: transform 0.3s;
cursor: pointer;
min-width: 120px;
text-align: center;
}
.flow-1-step:first-child {
clip-path: polygon(90% 0, 100% 50%, 90% 100%, 0% 100%, 0% 0%);
padding-left: 20px;
}
.flow-1-step:last-child {
clip-path: polygon(100% 0, 100% 100%, 0% 100%, 10% 50%, 0% 0%);
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
color: #005c4b;
}
.flow-1-step:hover {
transform: scale(1.05);
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0