<分区>
<分区>
这是我使用的CSS
html .body-dark{
background: #242A3F;
background: -webkit-linear-gradient(left top, #242A3F, #333C55);
background: -o-linear-gradient(bottom right, #242A3F, #333C55);
background: -moz-linear-gradient(bottom right, #242A3F, #333C55);
background: linear-gradient(to bottom right, #242A3F, #333C55);
background: -moz-linear-gradient(-90deg, red, yellow);
}
与 Jade 有关
doctype
html.no-js
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
base(href='/')
title Travel
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')
link(rel='stylesheet',href='main.css',async)
body.body-dark(ng-app='application')
div(ng-view)
<!-- build:js inline app.min.js -->
script(src='app.min.js')
<!-- /build -->
script(src='//localhost:35729/livereload.js')
正如您所看到的,渐变类附加到主体上,我假设应该只有一个渐变。但另一方面,这是我得到的输出
另一个重要信息可能是页面由两个组件组成,nav
模板和 form
模板都使用 ng-include< 调用
虽然我不确定错误是否是因为那个。
这里还有一份来自浏览器的 DOM 副本
如您所见,正文仅在表单结束之前出现,我如何才能将其扩展到整个页面。还有为什么下面有两个渐变元素?
最佳答案
设置
html, body, .body-dark{
background: #242A3F;
background: -webkit-linear-gradient(left top, #242A3F, #333C55);
background: -o-linear-gradient(bottom right, #242A3F, #333C55);
background: -moz-linear-gradient(bottom right, #242A3F, #333C55);
background: linear-gradient(to bottom right, #242A3F, #333C55);
background: -moz-linear-gradient(-90deg, red, yellow);
height: 100%;
}
关于javascript - 带有angularjs的css中奇怪的渐变行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41714876/
相关文章:
javascript - jQuery.extend() 和 jQuery.fn.extend() 是相同的......对吗?
javascript - "Object doesn' t support property or method 'find' "in IE11 with Babel and Webpack
javascript - knockout JS : Show message when the returned array is empty
javascript - 尝试制作 Canvas "jump"
css - 如何定位 div 使得 <p> 标签不会破坏位置?
javascript - angularjs 模板绑定(bind)
AngularJS、Jasmine 和 $ressource = promise 未解决
javascript - 为什么我可以删除一个声明为 a = 1 的变量而不是一个在 javascript 中声明为 var b = 1 的变量