题
将Innertext脱离XML Feed后不适用于我。我在想这样的事情可能有效:
foreach($html->find('td',1) as $e) {
echo '<div style="width:100%; word-wrap:break-word;">' . $e->innertext . '</div>';
}
.
但它没有包装。我正在使用Chrome查看结果。我也试图使宽度变小,无济于事。它最终切断了文字并在最后给了我一个......我错过了什么?
解决方案 2
This is something you need to change in the jquery mobile css: .ui-li-desc { white-space: normal; }
其他提示
I used below snippet and works fine, $html->find('td',1)
this snippet does not return an array it returns object at index 1. Correct way; If you want deal with all "td" tags you should remove second parameter
$e = $html->find('td',1);
echo '<div style="width:100%; word-wrap:break-word;">' . $e->innertext . '</div>';
不隶属于 StackOverflow