


This is not the kind of navigation where the content is hidden after the mouse is moved away. The content is not hidden after the mouse is moved away. I said this is like Baidu knowing that the following
always has content displayed, but when the mouse moves over a title, the corresponding content will be displayed. It is also like this in the forum.
The difference is that you don’t need to click
Reply to the discussion (solution)
xx:hover{display:block}
The situation mentioned above After the mouse leaves, the block disappears again
Just replace the onclick event with the mousemove event
Just replace the onclick event with the mousemove event
Wrong writing, replace it with mouseover Event
<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>三角图片效果的选项卡</title><style type="text/css">*{ margin:0; padding:0; font-size:12px;}body{ padding:30px;}.tabsBox{ width:400px; margin:20px auto;}.tabs{ height:20px;}.tabs li{ width:80px; text-align:center; padding-top:2px; line-height:18px; float:left; background-color:#3cc; margin-right:5px; list-style:none; position:relative; cursor:pointer; color:#fff;}.tabs li span{ display:none;}.tabs .cur{ background-color:#333;}.tabs .cur span{ display:block; width:1px; height:1px; border:solid 8px; border-color:#333 #fff #fff #fff; position:absolute; top:20px; left:32px; overflow:hidden; z-index:-1;}.cons{ height:120px; padding:8px 12px; overflow:hidden; border:1px solid #333; position:relative; z-index:1;}.cons ul li{ list-style:none; line-height:20px;}.hidden{ display:none;}.block{ display:block;}</style></head><body><div class="tabsBox"> <ul id="Tabs" class="tabs"> <li class="cur">国内新闻<span></span></li> <li>国际新闻<span></span></li> <li>社会新闻<span></span></li> <li>娱乐新闻<span></span></li> </ul> <div id="TabsCon" class="cons"> <ul> <li>[讨论] border老技巧书写的倒三角[仅供参考]1 </li> <li>[求助] 关于 Joomla 生成的 CSS</li> <li>[求助] css分隔线用什么好? </li> <li>[求助] 一行两列显示时内容被截断了,该怎么办? </li> <li>[讨论] 中英文混排时underline出现的问题</li> <li>[讨论] 关于CSS样式的书写顺序 </li> </ul> <ul> <li>[讨论] border老技巧书写的倒三角[仅供参考] 2</li> <li>[求助] 关于 Joomla 生成的 CSS</li> <li>[求助] css分隔线用什么好? </li> <li>[求助] 一行两列显示时内容被截断了,该怎么办? </li> <li>[讨论] 中英文混排时underline出现的问题</li> <li>[讨论] 关于CSS样式的书写顺序 </li> </ul> <ul> <li>[讨论] border老技巧书写的倒三角[仅供参考] 3</li> <li>[求助] 关于 Joomla 生成的 CSS</li> <li>[求助] css分隔线用什么好? </li> <li>[求助] 一行两列显示时内容被截断了,该怎么办? </li> <li>[讨论] 中英文混排时underline出现的问题</li> <li>[讨论] 关于CSS样式的书写顺序 </li> </ul> <ul> <li>[讨论] border老技巧书写的倒三角[仅供参考] 4</li> <li>[求助] 关于 Joomla 生成的 CSS</li> <li>[求助] css分隔线用什么好? </li> <li>[求助] 一行两列显示时内容被截断了,该怎么办? </li> <li>[讨论] 中英文混排时underline出现的问题</li> <li>[讨论] 关于CSS样式的书写顺序 </li> </ul> </div></div><script type="text/javascript"> var lis = document.getElementById("Tabs").getElementsByTagName("li"); var uls = document.getElementById("TabsCon").getElementsByTagName("ul"); var order = 0; for(var i=0; i<lis.length; i++){ lis[i].value = i; lis[i].onmouseover = function(){ ChangeTabs(this.value); }; uls[i].className = "hidden"; } lis[order].className = "cur"; uls[order].className = "block"; function ChangeTabs(nowTab){ lis[order].className = ""; uls[order].className = "hidden"; order = nowTab lis[nowTab].className = "cur"; uls[nowTab].className = "block"; }</script></body></html>

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

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

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.
