Day1.10 attribute set binding element row class styles

<! DOCTYPE HTML> 
<HTML lang = "EN">
<head>
<Meta charset = "UTF-. 8">
<title> the Title </ title>
<Script the src = "../ lib / JS / vue.js" > </ Script>
</ head>
<body>
<div the above mentioned id = "App">
<- through the object ->!
<h1: style = "styleObj1"> this is my first cat, named twilight North Korea </ h1>

<- through the array -!>
<h1: style = "[styleObj1, styleObj2]"> this is my first cat, named toward the twilight </ h1>
</ div>
<Script >
const Vue new new VM = ({
EL: '# App',
Data: {
// object properties, there is a horizontal line in quotes
styleObj1: {color: 'blue' , 'font-weight':200},
styleObj2:{'font-style':'italic'}
},
methods:{}
})
</script>
</body>
</html>

Guess you like

Origin www.cnblogs.com/zhaohui-116/p/12007282.html