CSS: how can I force a long string (without any bl

2019-01-04 17:47发布

I have a long string (a DNA sequence). It does not contain any whitespace character. e.g.:

ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTCGATGTAGCTAGTAGCATGTAGTGA

what would be the css selector to force this text to be wrapped in an html:textarea or in a xul:textbox

14条回答
姐就是有狂的资本
2楼-- · 2019-01-04 18:21

$string = "ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTCGATGTAGCTAGTAGCATGTAGTGA";

$wrappedstring = html_entity_decode(wordwrap($string,50,"<br>",true)); this is correct code

查看更多
仙女界的扛把子
3楼-- · 2019-01-04 18:22

For word-wrap:break-word; to work for me, I had to make sure the display was set to block, and that the width was set on the element. In Safari, it had to have a p tag and the width had to be set in ex.

查看更多
登录 后发表回答