[英]how do I center the content of s router-outlet
I'm trying to horizontally center the content of a router-outlet in angular;我正在尝试以角度水平居中路由器插座的内容; However all the regular tricks I am using are not working;但是,我使用的所有常规技巧都不起作用; after searching google for all the usual suspects i tried:在谷歌搜索我尝试过的所有常见嫌疑人之后:
this is an angular 2+ project这是一个有角度的 2+ 项目
html: HTML:
<img src="https://i.ibb.co/6R6pcMm/MRG-Updated-Logo.jpg" /> <!--centered-->
<router-outlet></router-outlet> <!--not_centered-->
css: CSS:
img {
display: block;
margin: 0 auto;
}
router-outlet {
display: block;
margin: 0 auto;
}
HTML HTML
<div class="center-me"><router-outlet></router-outlet></div>
CSS CSS
.center-me{
display: block;
margin: 0 auto;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.