【发布时间】:2018-03-04 20:05:21
【问题描述】:
我正在使用带有 angular-ui 引导框架的 angularJs,我的问题是我无法将 css 规则应用于我的网页。
我的 index.html 路线
.state("home",{
url:"Home",
views:{
'main':{templateUrl:"home.html"}
}
})
.state("forum",{
url:"forum",
views:{
'main3':{templateUrl:"forum.html"}
}
})
Forum.html ** bg 颜色不是蓝色的!**
<html>
<body style='background-color:blue'>
<h1>Forum</h1>
</body>
</html>
【问题讨论】:
-
您能否检查控制台中是否存在任何可能的错误?
-
打开 devtools 并检查此背景重新定义的位置
-
控制台没有错误
-
你很可能不想在每个 templateUrl 中都有 html 和 body 标签。
-
为什么你的模板有
html标签?它应该只出现一次
标签: angularjs css angular-ui-router angular-ui-bootstrap