如何给最外层id=app的div添加背景颜色??
我按照老师演示的style绑定,给app添加了背景颜色,但是没有效果,请问该如何正确设置其背景色??
代码如下:
<!DOCTYPE HTML><html xmlns:th="http://www.thymeleaf.org"><head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Getting Started: Serving Web Content</title> <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> <!-- import Vue before Element --> <script src="https://unpkg.com/vue/dist/vue.js"></script> <!-- import JavaScript --> <script src="https://unpkg.com/element-ui/lib/index.js"></script> <!-- import vue-resource --> <script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script></head><body> <!-- hello wzj --> <div id="app" :style="backgroudcolor"> <!-- 获取检索信息的表单 --> </div></body> backgroudcolor: { backgroundColor: 'red' }