<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Basic Tabs - jQuery EasyUI Demo</title> <style type="text/css">.divquery{ background: blue; float:left;}.qitem { display:inline-block; line-height:30px; text-align:right; width:250px; height:25px; overflow:hidden; background: green;}.divbtn{ float:left; width:120px; background: red; height:25px; right:10px; }</style></head><body> <div class="divquery"> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> </div> <div class="divbtn"> 查询 </div></body></html>
1.红色的div和蓝色的div并列,当页面宽度变化的时候,红色的div的宽度固定,蓝色的div宽度自适应
2.绿色的div宽度固定,当宽度不够的时候,绿色的div能换行排列,这个时候,蓝色div的高度就发生了变化,要求红色div的高度也随之变化
现在的情况是,红色的div经常跑到蓝色下面去,而且,红色div的高度不会变化:如图:
下午发了一个帖子,当时大致实验了一下,发现没问题,就结贴了,晚上仔细看,还是有点问题的,所以再开一贴来问问
回复讨论(解决方案)
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>Basic Tabs - jQuery EasyUI Demo</title> <style type="text/css"> .content{ width:100%; margin-right:120px; display: table; } .divquery{ background: blue; display: table-cell; vertical-align: top; } .qitem{ display:inline-block; line-height:30px; text-align:right; width:250px; height:25px; overflow:hidden; background: green; } .divbtn{ width:120px; background: red; display: table-cell; vertical-align: top; } </style> </head> <body> <div class="content"> <div class="divquery"> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> <span class="qitem"> 查询项目 </span> </div> <div class="divbtn"> 查询 </div> </div> </body></html>
二楼正解,display布局方式
table:指定对象作为块元素级的表格。类同于html标签
table-row:指定对象作为表格行。类同于html标签 |
table-row:指定对象作为表格行。类同于html标签 |

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.


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

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor
