


Implementation of drop-down menu, with picture description_html/css_WEB-ITnose
The clicks of drop-down 1 and drop-down 2 are independent. After the menu is expanded, the page length is automatically adjusted, including changes in the direction of the triangle.
I often see this effect on web pages. I don’t know how to achieve it. ,
I am an absolute novice, please give me some advice
Reply to the discussion (solution)
I don’t understand what you mean?
Similar to the directory index function above http://emulefans.com/, but this one is more simplified. The clicks of drop-down 1 and drop-down 2 are independent. After the menu is expanded, the page length is automatically adjusted, including changes in the direction of the triangle
I often see this effect on web pages, but I don’t know how to achieve it.
I am an absolute novice, please give me some advice
Use the third-party NavBarControl control
It can be achieved with JAVASCRIPT under BS.
Can you be more detailed? I usually use DW, and it is not entry-level. It can be implemented with JAVASCRIPT under BS.
The arrow is actually a small picture. When the OnClick event is triggered, the src attribute of this picture is changed. The submenu is to hide and display the modification of properties.
Let’s try it first. The arrow is actually a small picture. When the OnClick event is triggered, the src attribute of the picture is changed. The submenu is to hide and display the modification of properties.
<!DOCTYPE HTML><html> <head> <meta charset="gb2312" /> <title></title> <style> * { margin:0; padding:0; font-size:14px; } ul { list-style:none; } .arr { display:inline-block; position:absolute; left:40px; top:9px; width:0; height:0; overflow:hidden; border:5px dashed transparent; } .arr-t { border-top:5px solid #000; _border-width:4px; } .arr-b { top:4px; border-bottom:5px solid #000; } .bar { margin:100px; } .bar li { position:relative; margin-top:4px; padding:4px 6px; width:80px; border:1px solid #999; cursor:pointer; } .bar li div { padding-left:10px; } </style> </head> <body> <ul class="bar" id="bar"> <li> 菜单<span class="arr arr-t"></span> <div style="display:none;"> 1-1<br /> 1-1<br /> 1-1<br /> </div> </li> <li> 菜单<span class="arr arr-t"></span> <div style="display:none;"> 1-1<br /> 1-1<br /> 1-1<br /> </div> </li> </ul> <script> var $ = function(id){ return document.getElementById(id); }; var $t = function(tag, cot){ cot = cot || document; return cot.getElementsByTagName(tag); }; var objs = $t('li', $('obj')); for(var i = 0, len = objs.length; i < len; i++){ objs[i].onclick = function(){ var d = $t('div', this)[0]; var s = $t('span', this)[0]; if( d.style.display == 'none' ){ d.style.display = 'block'; s.className = s.className.replace('arr-t', 'arr-b'); }else{ d.style.display = 'none'; s.className = s.className.replace('arr-b', 'arr-t'); } } } </script> </body></html>
Try it
It’s really useful. Just modify the appearance and it should be fine. Thank you very much
Sorry for the slow reply.
HTML code
; title>

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...
