Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何将内容约束到模式对话框宽度?_Html_Css_Angular_Twitter Bootstrap 3_Modal Dialog - Fatal编程技术网

Html 如何将内容约束到模式对话框宽度?

Html 如何将内容约束到模式对话框宽度?,html,css,angular,twitter-bootstrap-3,modal-dialog,Html,Css,Angular,Twitter Bootstrap 3,Modal Dialog,我在模式对话框中有一长串文本,但文本不会环绕或停留在对话框中。我怎样才能解决这个问题?下面是对话框的图像和我的模板 共享指向{{selectedhousember.getName()}的链接 {{shareLink}} 接近 使用 宽度:100%; 最大宽度:100% 到父级 <div class="modal-body" style="text-align: center; word-wrap: break-word;"> &l

我在模式对话框中有一长串文本,但文本不会环绕或停留在对话框中。我怎样才能解决这个问题?下面是对话框的图像和我的模板


共享指向{{selectedhousember.getName()}的链接
{{shareLink}}

接近
使用

宽度:100%; 最大宽度:100%

到父级


<div class="modal-body" style="text-align: center; word-wrap: break-word;">
     <p>
        {{shareLink}}
     </p>
</div>
{{shareLink}}


使用
wordwrap:break-word使其正常工作。我引用了这个问题:

我是否将此样式放置在模态体上?是的,对于模态体,此问题通常在您未定义元素的特定宽度时发生。在此处输入模态体css样式{{shareLink}}我尝试了您的解决方案,并将其切换到该解决方案,并删除了标记。我希望链接保持在200px,但它仍然不起作用。
<div class="modal-body" style="text-align: center; word-wrap: break-word;">
     <p>
        {{shareLink}}
     </p>
</div>