image.png

代码

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Vue.js 样式-style(内联样式)</title>
    <script src="//static.gzj2001.com/vue/vue.js"></script>
</head>
<body>
    <div id="app">
        <div style="background-color: rebeccapurple;">城南花开</div>
        <div v-bind:style="{color:'red',fontSize:'30px'}">www.cnhk.pro</div>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                
            }
        })
    </script>
</body>
</html>