0
我正在構建一個應用程序,我必須「重置」瀏覽器應用的所有默認CSS。從Angular應用程序的父組件繼承CSS
但是,我不得不復制/粘貼這個每個xxx.component.css
,因爲它似乎不會從基線app.component.css
繼承任何css。
一切坐在app.component.html
模板下,像這樣:
<div class="wrapper">
<app-left-nav></app-left-nav>
<app-top-nav></app-top-nav>
<app-todo-section></app-todo-section>
<app-details-section></app-details-section>
<footer></footer>
</div>
反正是有配置CSS繼承在角?它是否應該在默認情況下發生?
這裏的「復位」的代碼在app.component.css
片段:
html,
body,
div,
span,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
mark,
audio,
video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
難道我做錯了什麼?如果需要代碼示例,請告訴我!
你可以放置一個代碼示例與CSS? – Aruna
@Aruna從哪個文件具體?我已經粘貼了'app.component.css'重置的片段。我不得不將這些代碼粘貼到每個Angular'component.css'文件中 – Dandy
你可以把你的角碼和它在哪個視圖中工作和不工作? – Aruna