For example:
Based on
<ul style="float: left;overflow:hidden;" ng-repeat='node in nodedata' >
<li style="list-style-type:none;">
<span style="background:green;" uib-popover="{{node.nodeIndex|getNodeNameFliter}}" popover-trigger="mouseenter" type="button" class="btn btn-default dd breath_light" popover-placement="bottom">{{node.nodeIndex|getNodeNameFliter}}</span> <i class="icon-chevron-right" style="margin-left:10px;color:green;font-size:20px;"></i>
</li>
</ul>
style="background:green;"`You can set red, yellow, green, and black according to different values 1, 2, 3, and 4 of node.status. How to implement black?
Waiting online, no one knows?
html code: using ng-style
js code:
As far as I know, CSS does not have such a function. The most famous CSS is media query, which can select different CSS styles according to different screen sizes. I think a request like the one in question can only be realized with the cooperation of JS.
Now there are actually some people who use inline styles
That’s what I would do
<style>
.backstyel1{background:red}
.backstyel2{background:yellow}
.backstyel3{background:green}
.backstyel4{background:black }
</style>