/ / Disabilita truncate listview header jquery mobile per testo lungo (parola singola) - javascript, jquery, jquery-ui, listview, jquery-mobile

Disabilita l'intestazione di listview troncata jquery mobile per il testo lungo (parola singola) - javascript, jquery, jquery-ui, listview, jquery-mobile

Ho una listview mobile di jQuery. Attualmente l'intestazione della visualizzazione elenco viene troncata e il testo termina con un "...". Vorrei disabilitare questo comportamento e mostrare il testo completo. Ho incontrato alcune soluzioni ma nessuna di esse funziona per una sola parola. Ad esempio, testo senza spazio bianco, ad esempio un indirizzo e-mail non funziona.

risposte:

3 per risposta № 1

DEMO

Il CSS che stai cercando è word-wrap:break-word;

ul li h2 {
white-space: normal !important;
word-wrap:break-word;
overflow-wrap: break-word;
}

Per ulteriore supporto del browser puoi provare:

ul li h2{
white-space: pre !important;           /* CSS 2.0 */
white-space: pre-wrap !important;      /* CSS 2.1 */
white-space: pre-line !important;      /* CSS 3.0 */
white-space: -pre-wrap !important;     /* Opera 4-6 */
white-space: -o-pre-wrap !important;   /* Opera 7 */
white-space: -moz-pre-wrap !important; /* Mozilla */
white-space: -hp-pre-wrap !important;  /* HP Printers */
word-wrap: break-word;      /* IE 5+ */
}