先看效果图:
下面是代码:
<!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('<div class="xiantiao" style="height:'+($(this).offset().top-$(this).parent().offset().top+20)+'px;width:'+($(this).offset().left-$(this).parent().parent().offset().left-20)+'px;"></div>'); }); $(".jiegou > div").each(function(){ $(this).css({left:'48px',top:($(this).height()+30)+'px',height:'24px'}); }) $("li.jd > div >ul >div").each(function(){ $(this).css({top:'12px',height:($(this).height()-20)+'px'}); }); $("li.jd > b").each(function(){ $(this).css({left:'-'+$(this).parent().css('margin-left').replace('px','')+'px'}); }); }); </SCRIPT> </body> </html>

JavaScript core data types are consistent in browsers and Node.js, but are handled differently from the extra types. 1) The global object is window in the browser and global in Node.js. 2) Node.js' unique Buffer object, used to process binary data. 3) There are also differences in performance and time processing, and the code needs to be adjusted according to the environment.

JavaScriptusestwotypesofcomments:single-line(//)andmulti-line(//).1)Use//forquicknotesorsingle-lineexplanations.2)Use//forlongerexplanationsorcommentingoutblocksofcode.Commentsshouldexplainthe'why',notthe'what',andbeplacedabovetherelevantcodeforclari

The main difference between Python and JavaScript is the type system and application scenarios. 1. Python uses dynamic types, suitable for scientific computing and data analysis. 2. JavaScript adopts weak types and is widely used in front-end and full-stack development. The two have their own advantages in asynchronous programming and performance optimization, and should be decided according to project requirements when choosing.

Whether to choose Python or JavaScript depends on the project type: 1) Choose Python for data science and automation tasks; 2) Choose JavaScript for front-end and full-stack development. Python is favored for its powerful library in data processing and automation, while JavaScript is indispensable for its advantages in web interaction and full-stack development.

Python and JavaScript each have their own advantages, and the choice depends on project needs and personal preferences. 1. Python is easy to learn, with concise syntax, suitable for data science and back-end development, but has a slow execution speed. 2. JavaScript is everywhere in front-end development and has strong asynchronous programming capabilities. Node.js makes it suitable for full-stack development, but the syntax may be complex and error-prone.

JavaScriptisnotbuiltonCorC ;it'saninterpretedlanguagethatrunsonenginesoftenwritteninC .1)JavaScriptwasdesignedasalightweight,interpretedlanguageforwebbrowsers.2)EnginesevolvedfromsimpleinterpreterstoJITcompilers,typicallyinC ,improvingperformance.

JavaScript can be used for front-end and back-end development. The front-end enhances the user experience through DOM operations, and the back-end handles server tasks through Node.js. 1. Front-end example: Change the content of the web page text. 2. Backend example: Create a Node.js server.

Choosing Python or JavaScript should be based on career development, learning curve and ecosystem: 1) Career development: Python is suitable for data science and back-end development, while JavaScript is suitable for front-end and full-stack development. 2) Learning curve: Python syntax is concise and suitable for beginners; JavaScript syntax is flexible. 3) Ecosystem: Python has rich scientific computing libraries, and JavaScript has a powerful front-end framework.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver Mac version
Visual web development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.
