这是一个div,最后一行怎么让它显示得漂亮点啊,或者多出来的字隐藏掉或者用...替换,求高手指导啊!
回复讨论(解决方案)
style="overflow:hidden"试试
文字的 line-height= 图片的高度/你所需显示的文字行数 。
当前样式加:overflow:hidden;zoom1;兼容ie6
当前样式加:overflow:hidden;zoom:1;
这是一个div,最后一行怎么让它显示得漂亮点啊,或者多出来的字隐藏掉或者用...替换,求高手指导啊!
overflow:hidden;后才有这个效果的,就是最下边一行被隐藏了
当前样式加:overflow:hidden;zoom:1;
不好使啊。。。
style="overflow:hidden"试试
overflow:hidden;后才有这个效果的,就是最下边一行被隐藏了
看你的效果,你应该设置了DIV的高度,你把高度给去掉应该就可以了。你要让最后一行变的好看,你可以给它加个class或id 设置它的属性,比如:颜色,大小,行高。
<!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">*{ padding:0px; margin:0px;}.fontcss{ width: 320px; border-radius: 8px; border: 2px solid #e0e7b8; padding: 10px; margin: 20px auto;}.fontcss p{ text-indent: 1em;}</style></head><body><div class="fontcss"> <img src="/static/imghwm/default1.png" data-src="1_epwqgdnbrh.jpg" class="lazy" style="max-width:90%" style="max-width:90%" alt="火影" style="float: left;margin-right: 10px;"/> <p>这是一个div,最后一行怎么让它显示得漂亮点啊,或者多出来的字隐藏掉或者用...替换,求高手指导啊!这是一个div,最后一行怎么让它显示得漂亮点啊,或者多出来的字隐藏掉或者用...替换,求高手指导啊!</p></div></body></html>
这样可以实现文字环绕,你看看,希望对你有帮助
单纯的想隐藏的漂亮的话,高度要被行高整除
<!DOCTYPE HTML><html> <head> <meta charset="gbk" /> <title></title> <style> div { width:300px; height:100px; border:1px solid red; line-height:20px; font-size:12px; overflow:hidden; } </style> </head> <body> <div> 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 发生的健康放讲的是开发就的伤口附近的 </div> </body></html>

Self-closingtagsinHTMLandXMLaretagsthatclosethemselveswithoutneedingaseparateclosingtag,simplifyingmarkupstructureandenhancingcodingefficiency.1)TheyareessentialinXMLforelementswithoutcontent,ensuringwell-formeddocuments.2)InHTML5,usageisflexiblebutr

To build a website with powerful functions and good user experience, HTML alone is not enough. The following technology is also required: JavaScript gives web page dynamic and interactiveness, and real-time changes are achieved by operating DOM. CSS is responsible for the style and layout of the web page to improve aesthetics and user experience. Modern frameworks and libraries such as React, Vue.js and Angular improve development efficiency and code organization structure.

Boolean attributes are special attributes in HTML that are activated without a value. 1. The Boolean attribute controls the behavior of the element by whether it exists or not, such as disabled disable the input box. 2.Their working principle is to change element behavior according to the existence of attributes when the browser parses. 3. The basic usage is to directly add attributes, and the advanced usage can be dynamically controlled through JavaScript. 4. Common mistakes are mistakenly thinking that values need to be set, and the correct writing method should be concise. 5. The best practice is to keep the code concise and use Boolean properties reasonably to optimize web page performance and user experience.

HTML code can be cleaner with online validators, integrated tools and automated processes. 1) Use W3CMarkupValidationService to verify HTML code online. 2) Install and configure HTMLHint extension in VisualStudioCode for real-time verification. 3) Use HTMLTidy to automatically verify and clean HTML files in the construction process.

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.


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

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

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

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

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
