html,css
html:css
.labelDiv{
display: inline-block;
width:75%;
overflow: hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
.iconDiv{
display: inline-block;
vertical-align:middle;
width:25%;
}
大概内容就是这样了,把div中的内容设为不换行实现了,但是.labelDiv的宽度却有了最小的宽度(当缩小的一定时候就不变了,但放大还是可以按比例缩放),如何让其宽度依然按比例缩放呢?新人谢谢解答了
回复讨论(解决方案)
LZ自己不是已经实现了么?
我实现了不换行,但是产生附带的问题了,相对宽度(75%)不能用了,我想问的是这个问题
<div class="labelDiv">内容不换行,宽度相对变化</div><div class="iconDiv">复选框</div><br class="clear" />
.labelDiv{ display: inline-block; width:75%; overflow: hidden; text-overflow: ellipsis; white-space:nowrap; float:left;}.iconDiv{ display: inline-block; vertical-align:middle; width:25%; float:right}.clear{clear:both;}

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.
