Home Web Front-end JS Tutorial JQuery self-made group organizational structure

JQuery self-made group organizational structure

Nov 01, 2016 pm 01:00 PM
html

先看效果图:

JQuery self-made group organizational structure

下面是代码:

<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>集团组织结构</title>
    <script src="http://cdn.bootcss.com/jquery/1.12.3/jquery.min.js" type="text/javascript"></script>

</head>

<body>
    <STYLE type=text/css>
        ul,
        li {
            list-style: none;
            margin: 0px;
            padding: 0px;
            z-index:2px;
        }
        
        .jiegou {
            margin-left: 20px;
            font-size: 12px;
            linge-height: 20px;
        }
        
        .jiegou li {width:300px;}
        
        .jiegou b {
            font-weight: normal;
            border: 4px solid #ddd;
            border-radius:15px;
            padding: 0 10px 0 10px;
            background: #a00;
            color: #fff;
            height: 20px;
            display: inline-block;
            margin-bottom: 5px;
            line-height: 20px;
            min-width: 160px;
            cursor:pointer;
            transition:all 0.2s;
            z-index:9999;
background-color:#d0451b;
        }
        .jiegou b:hover {
            background-color:#fff;
            color:#900;
            opacity:0.8}
        
        .jiegou li {
            position: relative;
        }
        
        .jiegou ul {
            margin-left: 60px;

        }
        .jiegou li.jd {
            margin-left:150px;
            height:20px;
            margin-bottom:10px;

        }
        .jiegou li.jd > b {position:absolute;left:-90px;z-index:9999;left:-150px;} 
        .jiegou li.jd > div{ position:absolute;left:-20px;top:1px; }
        .xiantiao {
            width: 60px;
            border-left: 1px solid #666;
            border-bottom: 1px solid #666;
            position: absolute;
            left: 20px;
            top: 26px;
            z-index:-1;
        }
        
        .cl:after {
            content: ".";
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
        }
    </STYLE>

    <UL class=jiegou>
        <LI><B>董事长</B>
            <ul><LI><B>董事会</B></LI></ul>
        </LI>
        <LI><B>副董事长</B>
            <ul><LI><B>董事长办公室</B></LI></ul>
        </LI>
        <LI><B>总经理</B>
            <ul>
                <LI><B>副总经理</B></LI>
                <LI><B>副总经理</B></LI>
                <LI><B>副总经理</B></LI>
                <LI><B>副总经理</B></LI>
                <li class="jd" style="margin-left:200px;">
                    <div style="top:-130px;">
                    <ul>
                        <LI><B>职能部门</B>
                            <ul>
                                <LI><B>集团公司办公室</B></LI>
                                <LI><B>人力资源部</B></LI>
                                <LI><B>财务部</B></LI>
                                <LI><B>审计部</B></LI>
                                <LI><B>信息安全部</B></LI>
                                <LI><B>法律事务部</B></LI>
                                <LI><B>资产管理部</B></LI>
                                <LI><B>安全保卫部</B></LI>
                                <LI><B>物业管理部</B></LI>
                            </ul>
                        </LI>
                        <LI><B>子公司</B>
                            <ul>
                                <li class="jd" style="margin-left:350px;">
                                    <b>一级子地产开发有限公司</b><b style="margin-left:250px;min-width:50px;">二级公司</b>
                                    <div style="top:-510px;">
                                    <ul>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                    </ul>
                                    </div>
                                </LI>
                                <LI><B>一级子地产开发有限公司</B></LI>
                                <LI><B>一级子地产开发有限公司</B></LI>
                                <LI><B>一级子地产开发有限公司</B></LI>
                                <LI><B>一级子地产开发有限公司</B></LI>
                                <LI><B>一级子地产开发有限公司</B></LI>
                                <li class="jd"  style="margin-left:350px;">
                                    <b>一级子地产开发有限公司</b><b style="margin-left:250px;min-width:50px;">二级公司</b>
                                    <div style="top:-12px;">
                                    <ul>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                        <LI><B>二级子地产开发有限公司</B></LI>
                                    </ul>
                                    </div>
                                </li>
                            </ul>
                        </LI>
                        <LI><B>业务部门</B>
                            <ul>
                                <LI><B>规划设计部</B>
                                    <ul>
                                        <LI><B>设计一部</B></LI>
                                        <LI><B>设计二部</B></LI>
                                        <LI><B>设计三部</B></LI>
                                        <LI><B>设计四部</B></LI>
                                        <LI><B>设计五部</B></LI>
                                    </ul>
                                </LI>
                                <LI><B>成本管理中心</B>
                                    <ul>
                                        <LI><B>审核部</B></LI>
                                        <LI><B>招投标部</B></LI>
                                        <LI><B>造价部</B></LI>
                                        <LI><B>采购部</B></LI>
                                    </ul>
                                </LI>
                                <LI><B>工程管理中心</B>
                                    <ul>
                                        <LI><B>总工办</B></LI>
                                        <LI><B>工程一部</B></LI>
                                        <LI><B>工程二部</B></LI>
                                        <LI><B>工程三部</B></LI>
                                        <LI><B>工程四部</B></LI>
                                        <LI><B>工程五部</B></LI>
                                    </ul>
                                </LI>
                                <LI><B>融资中心</B>
                                    <ul>
                                        <LI><B>融资一部</B></LI>
                                        <LI><B>融资二部</B></LI>
                                        <LI><B>融资三部</B></LI>
                                        <LI><B>融资四部</B></LI>
                                        <LI><B>融资五部</B></LI>
                                    </ul>
                                </LI>

                            </ul>
                        </LI>
                    </ul>
                    </div>
                </li>
                <LI><B>副总经理</B></LI>
                <LI><B>副总经理</B></LI>
                <LI><B>副总经理</B></LI>
                <LI><B>副总经理</B></LI>
            </ul>
        </LI>

    </UL>
    <SCRIPT> 
        jQuery(document).ready(function() { 
            $(".jiegou li").each(function(){ 
                $(this).parent().append(&#39;<div class="xiantiao" style="height:&#39;+($(this).offset().top-$(this).parent().offset().top+20)+&#39;px;width:&#39;+($(this).offset().left-$(this).parent().parent().offset().left-20)+&#39;px;"></div>&#39;); 
            }); 
            $(".jiegou > div").each(function(){
                $(this).css({left:&#39;48px&#39;,top:($(this).height()+30)+&#39;px&#39;,height:&#39;24px&#39;});
            })
             $("li.jd > div >ul >div").each(function(){
                $(this).css({top:&#39;12px&#39;,height:($(this).height()-20)+&#39;px&#39;});
            });
            $("li.jd > b").each(function(){
                $(this).css({left:&#39;-&#39;+$(this).parent().css(&#39;margin-left&#39;).replace(&#39;px&#39;,&#39;&#39;)+&#39;px&#39;});
            });
        }); 
    </SCRIPT>
</body>

</html>
Copy after login


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1665
14
PHP Tutorial
1270
29
C# Tutorial
1249
24
Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles