<script type="text/javascript"> $(document).ready(function() { $(".flip").click(function() { $(".panel").slideToggle("slow"); }); $(".flip2").click(function() { $(".panel2").slideToggle("slow"); }); });</script><style type="text/css">div.panel, div.flip, div.panel2, div.flip2 { margin: 0px; padding: 5px; text-align: center; background: #e5eecc; border: solid 1px #c3c3c3;}div.panel { display: none;}div.panel2 { display: none;}ul li { list-style-type: none;}</style><body> <ul> <li> <div style="width: 10%; height: 20px; float: left; text-align: right; overflow: hidden;">例子1</div> <div class="flip" style="width: 88%; height: 20px; float: right;">请点击这里</div> <div class="panel" style="width: 88%; float: right;"> <p>W3School - 领先的 Web 技术教程站点</p> <p>在 W3School,你可以找到你所需要的所有网站建设教程。</p> </div> </li> <li> <div style="width: 10%; float: left; text-align: right; overflow: hidden;">例子2</div> <div class="flip2" style="width: 88%; float: right;">请点击这里</div> <div class="panel2" style="width: 88%; float: right;"> <p>W3School - 领先的 Web 技术教程站点</p> <p>在 W3School,你可以找到你所需要的所有网站建设教程。</p> </div> </li> </ul></body>
我想点击然后下滑,这个功能实现了。一开始点击“请点击”的这个div会变长,我下写了高度,div固定了但是里面的字跑到外面去了。列子1和例子2这两个div也是,请问该怎么解决
回复讨论(解决方案)
没看到字跑到外面啊
试下
ul li {
list-style-type: none;clear: both;
}
没看到字跑到外面啊
点列子1或者请点击 多点几次就会发现了
试下
ul li {
list-style-type: none;clear: both;
}
没看到字跑到外面啊
你发个图我看看
我想要这样的
但是会变成这样
没看到字跑到外面啊
你发个图我看看 在六楼
没看到字跑到外面啊
你发个图我看看 在六楼
我试了很多浏览器,都没有出现你那个问题,你用的什么浏览器
没看到字跑到外面啊
你发个图我看看 在六楼
我试了很多浏览器,都没有出现你那个问题,你用的什么浏览器
火狐

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.


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

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version