<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>v-bind</title>
<script src="vue.js" type="text/javascript" charset="UTF-8"></script>
</head>
<body>
<div id="app">
{{message}}
<div v-bind:class="color">test</div>
</div>
<script type="text/javascript">
var app=new Vue({
el: '#app',
data :{
message: 'hello Vue!',
//color:'red',
color:'blue'
}
});
</script>
<style type="text/css">
.red{color:red}
.blue{color:blue;font-size:100px}
</style>
</body>
</html>
【四二学堂】模板语法之三(v-bind:vue系列入门示例之七)
猜你喜欢
转载自blog.csdn.net/weixin_39593940/article/details/105048633
今日推荐
周排行