1 Star 0 Fork 0

huangqic/vuedemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
属性绑定.html 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
huangqichang 提交于 2021-02-22 11:24 +08:00 . 初始化
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>vue1</title>
<script src="js/vue.js"></script>
<style>
*{
margin:0;
padding: 0;
}
.size{
font-size: 100px;
}
.color{
color:red;
}
.active{
background: skyblue;
}
</style>
</head>
<body>
<div id="app">
<!-- <p :class="['size','color','active']">我是段落</p> -->
<p :class="obj">我是段落</p>
</div>
<script>
let vue = new Vue({
// 告诉vue的实例对象,将来需要控制界面上的那个区域
el:'#app',
data:{
name:"内容1",
obj:{
"size": true,
"color":true,
"active":true
}
}
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML/CSS
1
https://gitee.com/huangqic/vuedemo.git
git@gitee.com:huangqic/vuedemo.git
huangqic
vuedemo
vuedemo
master

搜索帮助