Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.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/38.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 Css空白:前置行未按预期工作_Html_Css_Angular_Typescript - Fatal编程技术网

Html Css空白:前置行未按预期工作

Html Css空白:前置行未按预期工作,html,css,angular,typescript,Html,Css,Angular,Typescript,内容:字符串; this.content=“系统无法处理您的请求。请使用浏览器的后退按钮。” .content{ 空白:行前; } {{content}} 问题在于您是否将标记视为文本的一部分?如果是这样的话,css与它无关。行前的空白序列被折叠。换行符处、换行符处以及填充行框所需的换行符处都会断开行。是否使用角度?在这种情况下,您可以作为innerHTML传递以显示html内容@Ted是的,这就是问题所在,为什么你说css与之无关?@vishnusandhireddy是的,我使用的是Angu

内容:字符串;
this.content=“系统无法处理您的请求。
请使用浏览器的后退按钮。”
.content{
空白:行前;
}

{{content}}

问题在于您是否将

标记视为文本的一部分?如果是这样的话,css与它无关。行前的空白序列被折叠。换行符处、换行符处以及填充行框所需的换行符处都会断开行。是否使用角度?在这种情况下,您可以作为innerHTML传递以显示html内容@Ted是的,这就是问题所在,为什么你说css与之无关?@vishnusandhireddy是的,我使用的是Angular。在你链接的帖子中,他们说这被认为是不安全的。