div里面的内容跑到外面来了_html/css_WEB-ITnose
<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;
}
没看到字跑到外面啊
你发个图我看看
我想要这样的
但是会变成这样
没看到字跑到外面啊
你发个图我看看 在六楼
没看到字跑到外面啊
你发个图我看看 在六楼
我试了很多浏览器,都没有出现你那个问题,你用的什么浏览器
没看到字跑到外面啊
你发个图我看看 在六楼
我试了很多浏览器,都没有出现你那个问题,你用的什么浏览器
火狐

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

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



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 <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

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

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.

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.

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.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.
