纯css流程图

这篇具有很好参考价值的文章主要介绍了纯css流程图。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

 纯css流程图,css,流程图,前端

 文章来源地址https://www.toymoban.com/news/detail-677092.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /*Now the CSS*/
        * {margin: 0; padding: 0;}

        .tree ul {
            padding-top: 20px; position: relative;
            overflow: auto;
            transition: all 0.5s;
            -webkit-transition: all 0.5s;
            -moz-transition: all 0.5s;

        }

        .tree li {
            float: left; text-align: center;
            list-style-type: none;
            position: relative;
            padding: 20px 5px 0 5px;
            
            transition: all 0.5s;
            -webkit-transition: all 0.5s;
            -moz-transition: all 0.5s;
        }

        /*We will use ::before and ::after to draw the connectors*/

        .tree li::before, .tree li::after{
            content: '';
            position: absolute; top: 0; right: 50%;
            border-top: 1px solid #ccc;
            width: 50%; height: 20px;
        }
        .tree li::after{
            right: auto; left: 50%;
            border-left: 1px solid #ccc;
        }

        /*We need to remove left-right connectors from elements without 
        any siblings*/
        .tree li:only-child::after, .tree li:only-child::before {
            display: none;
        }

        /*Remove space from the top of single children*/
        .tree ul>li:only-child{ padding-top: 0;}

        /*Remove left connector from first child and 
        right connector from last child*/
        .tree li:first-child::before, .tree li:last-child::after{
            border: 0 none;
        }
        /*Adding back the vertical connector to the last nodes*/
        .tree li:last-child::before{
            border-right: 1px solid #ccc;
            border-radius: 0 5px 0 0;
            -webkit-border-radius: 0 5px 0 0;
            -moz-border-radius: 0 5px 0 0;
        }
        .tree li:first-child::after{
            border-radius: 5px 0 0 0;
            -webkit-border-radius: 5px 0 0 0;
            -moz-border-radius: 5px 0 0 0;
        }

        /*Time to add downward connectors from parents*/
        .tree ul ul::before{
            content: '';
            position: absolute; top: 0; left: 50%;
            border-left: 1px solid #ccc;
            width: 0; height: 20px;
        }

        .tree li a{
            border: 1px solid #ccc;
            padding: 5px 10px;
            text-decoration: none;
            color: #666;
            font-family: arial, verdana, tahoma;
            font-size: 11px;
            display: inline-block;
            
            border-radius: 5px;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            
            transition: all 0.5s;
            -webkit-transition: all 0.5s;
            -moz-transition: all 0.5s;
        }

        /*Time for some hover effects*/
        /*We will apply the hover effect the the lineage of the element also*/
        .tree li a:hover, .tree li a:hover+ul li a {
            background: #c8e4f8; color: #000; border: 1px solid #94a0b4;
        }
        /*Connector styles on hover*/
        .tree li a:hover+ul li::after, 
        .tree li a:hover+ul li::before, 
        .tree li a:hover+ul::before, 
        .tree li a:hover+ul ul::before{
            border-color:  #94a0b4;
        }

        /*Thats all. I hope you enjoyed it.
        Thanks :)*/
    </style>
</head>
<body>
    <!--
We will create a family tree using just CSS(3)
The markup will be simple nested lists
-->
<div class="tree">
	<ul>
		<li>
			<a href="#">Parent</a>
			<ul>
				<li>
					<a href="#">Child</a>
					<ul>
						<li>
							<a href="#">Grand Child</a>
						</li>
					</ul>
				</li>
				<li>
					<a href="#">Child</a>
					<ul>
						<li><a href="#">Grand Child</a></li>
						<li>
							<a href="#">Grand Child</a>
							<ul>
								<li>
									<a href="#">Great Grand Child</a>
								</li>
								<li>
									<a href="#">Great Grand Child</a>
								</li>
								<li>
									<a href="#">Great Grand Child</a>
								</li>
							</ul>
                            <ul style="display: flex;justify-content: center;">
								<li>
									<a href="#">Great Grand Child</a>
								</li>
							</ul>
						</li>
						<li><a href="#">Grand Child</a></li>
					</ul>
				</li>
			</ul>
		</li>
	</ul>
</div>
</body>
</html>

到了这里,关于纯css流程图的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 前端Web实战:从零打造一个类Visio的流程图拓扑图绘图工具

    大家好,本系列从Web前端实战的角度,给大家分享介绍如何从零打造一个自己专属的绘图工具,实现流程图、拓扑图、脑图等类Visio的绘图工具。 免费好用、 专属自己的绘图工具 前端项目实战学习 如何从0搭建一个前端项目等基础框架 项目设计思路及优雅的架构技巧 开源项

    2024年02月16日
    浏览(25)
  • 流程图实现,基于vue2实现的流程图

    flex布局 + 伪元素实现竖直的连接线+组件递归 2.1基础的(未截全,大致长这样)  2.2带有收缩功能的,可以展开和收缩并显示数量     4.项目源码地址 GitHub - yft-code/flow: 流程图 纯css实现流程图

    2024年02月16日
    浏览(29)
  • 流程图如何制作?5步快速画出好看的流程图!

    流程图是一种图形化工具,描述某个过程或者操作的步骤,以及某种业务系统的具体流程。流程图通常由各种图形符号、形状、箭头组成,可以清晰的表示出流程或系统中各种步骤、每个环节之间的关系、条件判断、数据的流动和处理过程等。           对于负责策划的职场

    2024年02月14日
    浏览(35)
  • Qt (高仿Visio)流程图组件开发(七) 流程图 简单操作界面搭建

    Qt (高仿Visio)流程图组件开发(一) 效果展示及基本开发框架构思 Qt (高仿Visio)流程图组件开发(二) 基本图元绘制 图元间连线绘制 Qt (高仿Visio)流程图组件开发(三) 图元基类如何定义,流程图多种图元类型实现 Qt (高仿Visio)流程图组件开发(四) 流程图 图元

    2023年04月25日
    浏览(35)
  • Python 代码一键转流程图---python=>flowchart-dsl=>流程图

    这个项目是基于大名鼎鼎的 flowchart.js。 下面贴几张运行图片:  如果直接输入dsl代码,再进行转化就可以很好的画出流程图       如果你使用 Typora,可能知道在 Typora 中用 flow 可以用一种简单的文本语言来写流程图,根据 Typora 的文档,这个功能来自开源的 flowchart.js。

    2024年02月08日
    浏览(40)
  • 提升绘图效率不再难,看看这8款AI流程图软件,一键快速生成流程图!

    流程图是表示流程、系统和思想的重要视觉辅助工具。在当今数字时代,AI技术的出现已经彻底改变了制作流程图的方式。 在本文中,我们将与各位分享 8款好用的AI流程图软件 ,借助每款软件内置的AI能力,可以快速绘制出一份完整的流程图,以简化和增强你的绘图体验。

    2024年02月03日
    浏览(33)
  • springboot启动流程源码解析(带流程图)

    本文自己写的(头条也有这篇文章),若有问题,请指正。 大致流程如下: 1. 初始化SpringApplication,从META-INF下的spring.factories读取 ApplicationListener/ApplicationContextInitializer 2.运行SpringApplication的run方法 3.读取项目中环境变量、jvm配置信息、配置文件信息等 4.创建Spring容器对象(

    2024年02月08日
    浏览(32)
  • Vscode画流程图

    在vscode打开此文件 ,就可以进行绘制流程图啦

    2024年02月11日
    浏览(34)
  • 产品流程图

    3.1业务流程图 | 泳道图(给产品经理看) 3.2任务流程图(给程序员看) 3.3页面流程图(给UI设计人员看) 4.1调查研究 4.2梳理提炼 4.3 确认评估 4.4 维护更新 3.1业务流程图 | 泳道图(给产品经理看) 3.2任务流程图(给程序员看) 3.3页面流程图(给UI设计人员看) 4.1调查研究

    2024年02月16日
    浏览(30)
  • UML与流程图

    UML(Unified Modeling Language,统一建模语言)是一种用于软件系统分析与设计的标准化建模语言。它提供了一套丰富的图形符号和规则,可用于描述系统的结构、行为和交互,帮助开发人员、设计师和利益相关者之间进行沟通和协作。 在UML中,有多种不同类型的图形,每种图形

    2024年02月09日
    浏览(30)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包