Vue.js中对css的操作(修改)具体方式详解

2020-06-14 06:29:26易采站长站整理

this.$refs.abc.style.display = 'inline'
console.log(111) 
console.log(this.$refs.abc.style.display) 
},
computed: {
compuretu: function() {
return {
compuretu: this.serd && this.slid
}
}
},
methods:{

}
}
</script>
<style>
.mycss {
color: blue
}

.colordisplay {
display: inline;
background: red;
border: 1px solid blue
}

.mycolor {
color: orange
}

.computed {
border: 1px solid yellow
}
.compuretu{
color:white;
background: red;
}
</style>

当然最后这种方式对于初入门的朋友来讲可能会有点理解不透,所以我更建议大家使用前几种方式

总结

以上所述是小编给大家介绍的Vue.js中对css的操作(修改)具体方式详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对软件开发网网站的支持!