Meta tags:
description= Usa la propiedad abreviada CSS line-clamp para especificar en qué línea se debe cortar el texto. Definición, valores y ejemplos.;
Headings (most frequently used words):
line, clamp, propiedad, de, css, la, por, qué, usar, sintaxis, ejemplo, propiedades, soporte, valores, limitaciones, temas, relacionados, práctica, resultado,
Text of the page (most frequently used words):
line (40), css (38), border (34), clamp (33), text (25), webkit (21), font (20), overflow (19), color (19), grid (18), style (17), box (16), para (15), aprender (15), #propiedad (15), width (15), background (14), column (14), break (11), líneas (11), texto (11), bottom (11), los (10), html (10), una (10), que (10), flex (10), right (10), left (10), línea (9), display (9), top (9), image (9), animation (9), las (8), position (8), stroke (8), propiedades (7), soporte (7), height (7), padding (7), align (7), decoration (7), offset (7), ejemplo (6), por (6), page (6), puntos (6), suspensivos (6), vertical (6), hidden (6), margin (6), type (6), variant (6), w3docs (5), sintaxis (5), número (5), del (5), navegadores (5), orient (5), element (5), sin (5), prefijo (5), transition (5), last (5), outline (5), radius (5), child (5), formatter (5), todos (4), generator (4), práctica (4), qué (4), elemento (4), wrap (4), sola (4), white (4), space (4), con (4), como (4), none (4), copiar (4), the (4), justify (4), content (4), direction (4), items (4), tres (4), mode (4), transform (4), fill (4), size (4), list (4), template (4), row (4), gap (4), rule (4), nth (4), first (4), json (3), code (3), encoder (3), editor (3), cuestionarios (3), ejercicios (3), php (3), javascript (3), limitaciones (3), valores (3), usar (3), contenido (3), utiliza (3), bloque (3), truncamiento (3), flexbox (3), estándar (3), compatibilidad (3), object (3), versión (3), antes (3), puede (3), forma (3), máximo (3), más (3), property (3), body (3), shadow (3), title (3), word (3), spacing (3), range (3), origin (3), before (3), after (3), max (3), letter (3), columns (3), auto (3), clip (3), only (3), ver (3), string (3), tools (3), italiano (2), português (2), español (2), français (2), русский (2), deutsch (2), english (2), beautifier (2), diff (2), password (2), herramientas (2), python (2), java (2), git (2), libros (2), ejemplos (2), fragmentos (2), temas (2), relacionados (2), this (2), efecto (2), limitar (2), cuál (2), función (2), oculta (2), recorta (2), mantiene (2), module (2), level (2), valor (2), consulta (2), cuando (2), actuales (2), funcional (2), siendo (2), pero (2), depende (2), truncar (2), mostrar (2), integer (2), descripción (2), esta (2), funciona (2), debe (2), corta (2), media (2), default (2), div (2), lorem (2), ipsum (2), dummy (2), industry (2), class (2), head (2), center (2), ccc (2), eee (2), farthest (2), radial (2), gradient (2), side (2), recorte (2), usa (2), multilínea (2), donde (2), nowrap (2), visibility (2), unicode (2), timing (2), function (2), duration (2), delay (2), rendering (2), skip (2), perspective (2), inside (2), anchor (2), path (2), blend (2), min (2), rows (2), start (2), end (2), flow (2), feature (2), empty (2), counter (2), count (2), repeat (2), read (2), hash (2), 2026, derechos, reservados, hecho, desarrolladores, idioma, política, privacidad, contacto, acerca, empresa, try, tutoriales, gratuitos, web, desde, 2014, next, previous, yes, was, helpful, comprobar, crea, visual, sujeción, restringiendo, mostradas, alinear, largo, aplicar, estilos, divide, palabras, largas, desborden, gestiona, ajuste, complemento, controla, cómo, muestra, desbordado, nota, implementación, heredada, utilizada, antiguos, aquí, únicamente, alternativa, advertencia, lineclamp, dom, animable, heredable, aplica, inicial, supports, puedes, envolver, reglas, características, necesites, detectar, aplicarlas, funcionar, simple, requiere, varias, carácter, fijo, encajar, bien, idiomas, representación, fuentes, personalizar, parte, está, adoptada, aún, debes, declarar, mayor, conveniente, tiene, algunas, restricciones, vale, pena, conocer, establece, superan, límite, desborda, aparecen, organiza, contenedor, verticalmente, puedan, contarse, recortarse, cambia, diseño, heredado, sobre, define, necesaria, establecer, ocultar, desbordamiento, dado, tercera, implementan, realmente, declaran, tanto, regla, funcione, siga, válida, gane, uploads, 0001, 510c4d8bde7d07ba0ff1b843ad8b4dfdc122aadf, png, result, 420x, resultado, pruébalo, mismo, simply, printing, and, typesetting, has, been, standard, ever, since, 1500s, example, 200, 666, fff, 100, 400, corner, document, doctype, siguiente, párrafo, observa, complementarias, son, necesarias, surta, abajo, desactivar, entero, positivo, indicar, requería, combinar, ese, truco, solo, todo, fila, resuelve, caso, quieren, exactamente, ajustadas, seguidas, ellipsis, página, cubre, así, trunca, específico, añade, punto, crear, vistas, previas, leer, tarjeta, importar, longitud, original, abreviada, especificar, cortar, definición, zoom, index, writing, will, change, widows, user, select, bidi, underline, orientation, indent, ink, combine, upright, table, layout, tab, linecap, dashoffset, dasharray, speak, shape, outside, scrollbar, scroll, behavior, resize, quotes, pointer, events, place, orphans, order, opacity, rotate, distance, fit, mix, lines, keyframes, isolation, initial, import, hyphens, hanging, punctuation, areas, area, weight, numeric, ligatures, east, asian, caps, alternates, stretch, language, override, adjust, kerning, values, settings, family, face, float, shrink, grow, basis, filter, cells, cursor, reset, increment, span, clear, charset, caret, caption, sizing, source, slice, outset, collapse, block, bleed, attachment, backface, appearance, play, state, name, iteration, self, all, properties, visited, valid, target, selection, scope, root, required, write, placeholder, out, optional, not, link, lang, invalid, indeterminate, hover, fullscreen, focus, enabled, disabled, dir, checked, active, selectores, selectors, css3, guía, guides, gradientes, nombres, colores, tablas, links, uso, introducción, basic, iniciar, sesión, buscar, formatters, url, reverse, sha256, md5, length, calculator, colors, hsl, hex, mixer, converter, picker, general, cursos,
Text of the page (random words):
propiedad css line clamp w3docs w3docs libros aprender html aprender css aprender javascript aprender git aprender java aprender php aprender python cursos cuestionarios ejercicios fragmentos herramientas general tools html editor password generator html encoder code diff json beautifier ver los 13 color tools color picker color converter color mixer color hex colors hsl ver los 10 string tools string length calculator md5 hash generator sha256 hash generator string reverse url encoder ver los 19 code formatters javascript formatter css formatter html formatter json formatter php formatter buscar en w3docs k es english en deutsch de русский ru français fr español es português pt italiano it iniciar sesión aprender css css basic introducción a css uso de css sintaxis css css id y class texto en css css font css links tablas css css border css padding css margin nombres de colores css gradientes css css guides guía de flexbox propiedades de css3 css selectors selectores css active after before checked default dir disabled empty enabled first child first letter first line first of type focus fullscreen hover in range indeterminate invalid lang last child last of type link not nth child nth last child nth last of type nth of type only child only of type optional out of range placeholder read only read write required root scope selection target valid visited css properties align content align items all animation align self animation delay animation direction animation duration animation fill mode animation iteration count animation name animation play state animation timing function appearance backface visibility background background attachment background blend mode background clip background color background image background origin background position background position x background position y background repeat background size bleed block overflow border border bottom border bottom color border bottom left radius border bottom right radius border bottom style border bottom width border collapse border color border image border image outset border image repeat border image slice border image source border image width border left border left color border left style border left width border radius border right border right color border right style border right width border spacing border style border top border top color border top left radius border top right radius border top style border top width border width bottom box decoration break box shadow box sizing break after break before break inside caption side caret color charset clear clip clip path color columns column count column fill column gap column rule column rule color column rule style column rule width column span column width content counter increment counter reset cursor direction display empty cells fill filter flex flex basis flex direction flex flow flex grow flex shrink flex wrap float font font face font display font family font feature settings font feature values font kerning font size font size adjust font language override font stretch font style font variant font variant alternates font variant caps font variant east asian font variant ligatures font variant numeric font weight grid grid area grid auto columns grid auto flow grid auto rows grid column grid column end grid column gap grid column start grid gap grid row grid row end grid row gap grid row start grid template grid template areas grid template columns grid template rows hanging punctuation height hyphens image rendering import initial letter isolation justify content justify items keyframes left letter spacing line break line clamp line height list style list style image list style position list style type margin margin bottom margin left margin right margin top max height max lines max width media min height min width mix blend mode object fit object position offset offset anchor offset distance offset path offset position offset rotate opacity order orphans outline outline color outline offset outline style outline width overflow overflow anchor overflow wrap overflow x overflow y padding padding bottom padding left padding right padding top page break page break after page break before page break inside perspective perspective origin place items pointer events position quotes resize right scroll behavior scrollbar shape outside speak stroke stroke dasharray stroke dashoffset stroke linecap stroke width tab size table layout text align text align last text combine upright text decoration text decoration color text decoration line text decoration skip text decoration skip ink text decoration style text fill color text indent text justify text orientation text overflow text rendering text shadow text stroke text stroke color text stroke width text transform text underline position top transform transform origin transform style transition transition delay transition duration transition property transition timing function unicode bidi unicode range user select vertical align visibility white space widows width will change word break word spacing word wrap writing mode z index zoom propiedad css line clamp usa la propiedad abreviada css line clamp para especificar en qué línea se debe cortar el texto definición valores y ejemplos la propiedad line clamp trunca un bloque de texto a un número específico de líneas y añade puntos suspensivos en el punto donde se corta el texto es la forma estándar de crear vistas previas de leer más multilínea por ejemplo limitar la descripción de una tarjeta a tres líneas sin importar la longitud del texto original esta página cubre la sintaxis un ejemplo funcional las propiedades de soporte de las que depende line clamp la compatibilidad con navegadores y el prefijo webkit así como las limitaciones de la propiedad por qué usar line clamp antes de line clamp truncar el texto a una línea requería combinar overflow hidden white space nowrap y text overflow ellipsis ese truco solo funciona para una sola línea white space nowrap mantiene todo en una fila line clamp resuelve el caso multilínea donde se quieren exactamente tres líneas ajustadas seguidas de puntos suspensivos sintaxis line clamp none integer copiar usa none para desactivar el recorte o un entero positivo para indicar el número máximo de líneas a mostrar ejemplo de la propiedad line clamp el siguiente ejemplo recorta el párrafo a tres líneas observa las tres propiedades complementarias display webkit box webkit box orient vertical y overflow hidden que son necesarias para que el recorte surta efecto consulta propiedades de soporte más abajo doctype html html head title title of the document title style body align items center background radial gradient farthest side at bottom left eee ccc radial gradient farthest corner at bottom right eee ccc 400 px display flex flex direction column height 100 vh justify content center line height 1 5 element background color fff box shadow 1 px 1 px 10 px 666 padding 2 em width 200 px element p display webkit box webkit line clamp 3 line clamp 3 webkit box orient vertical overflow hidden style head body h2 css line clamp property example h2 div class element p lorem ipsum is simply dummy text of the printing and typesetting industry lorem ipsum has been the industry s standard dummy text ever since the 1500s p div body html copiar pruébalo tú mismo resultado propiedad css line clamp uploads media default 0001 04 510c4d8bde7d07ba0ff1b843ad8b4dfdc122aadf png css line clamp property result 420x en el ejemplo dado el texto se corta en la tercera línea como webkit line clamp es la forma que los navegadores implementan realmente se declaran tanto webkit line clamp 3 como el estándar line clamp 3 para que la regla funcione en todos los navegadores actuales y siga siendo válida cuando la propiedad sin prefijo gane más soporte propiedades de soporte line clamp no funciona por sí sola el elemento debe establecer un flex box y ocultar el desbordamiento propiedad por qué es necesaria display webkit box cambia el elemento al diseño flexbox heredado sobre el que se define line clamp webkit box orient vertical organiza las líneas del contenedor verticalmente para que puedan contarse y recortarse overflow hidden oculta las líneas que superan el límite sin esta propiedad el texto se desborda y no aparecen los puntos suspensivos valores valor descripción none sin número máximo de líneas ni truncamiento integer establece el número máximo de líneas antes de truncar el contenido y mostrar puntos suspensivos limitaciones de la propiedad css line clamp la propiedad es conveniente pero tiene algunas restricciones que vale la pena conocer depende del prefijo webkit en todos los navegadores actuales la propiedad funcional es webkit line clamp la versión sin prefijo line clamp forma parte del css overflow module level 4 y está siendo adoptada pero aún debes declarar la versión con prefijo para mayor compatibilidad no se puede personalizar los puntos suspensivos el carácter de truncamiento es fijo y puede no encajar bien con todos los idiomas o la representación de fuentes requiere varias propiedades de soporte para funcionar no se puede usar en un elemento de bloque simple element overflow hidden display webkit box webkit line clamp 2 line clamp 2 webkit box orient vertical copiar puedes envolver las reglas en una consulta de características cuando necesites detectar el soporte antes de aplicarlas supports webkit line clamp 2 element overflow hidden display webkit box webkit line clamp 2 webkit box orient vertical copiar valor inicial none se aplica a heredable sí animable no versión css overflow module level 4 sintaxis dom object style lineclamp 2 advertencia nota display webkit box es una implementación flexbox heredada y no estándar utilizada por navegadores webkit antiguos se mantiene aquí únicamente como alternativa de compatibilidad temas relacionados css text overflow recorta una sola línea con puntos suspensivos css overflow controla cómo se muestra u oculta el contenido desbordado css white space gestiona el ajuste de línea complemento del truncamiento en una sola línea css overflow wrap divide palabras largas para que no se desborden práctica práctica cuál es la función de line clamp en css cuál es la función de line clamp en css se utiliza para aplicar estilos a una línea se utiliza para limitar el número de líneas en un bloque de texto se utiliza para alinear el texto a lo largo de una línea crea un efecto visual de sujeción en el contenido de un elemento restringiendo las líneas de texto mostradas comprobar was this page helpful yes no previous line break next line height on this page por qué usar line clamp sintaxis ejemplo de la propiedad line clamp propiedades de soporte valores limitaciones de la propiedad css line clamp temas relacionados práctica w3docs tutoriales ejemplos ejercicios fragmentos y cuestionarios gratuitos para la web desde 2014 libros aprender html aprender css aprender javascript aprender git aprender java aprender php aprender python práctica ejercicios cuestionarios editor try it herramientas html editor password generator html encoder code diff json beautifier empresa acerca de contacto política de privacidad idioma english deutsch русский français español português italiano 2026 w3docs todos los derechos reservados hecho para desarrolladores
|