<div id="app">
<h1>{{ fullName(firstName, lastName) }}</h1>
<h1>{{ fullName('大漠', 'w3cplus.com') }}</h1>
</div>
@import url(https://fonts.googleapis.com/css?family=Montserrat);
html,body {
width: 100vw;
height: 100vh;
}
body {
display: flex;
justify-content: center;
align-items: center;
font-family: montserrat;
background:
linear-gradient(rgba(196, 102, 0, 0.6), rgba(155, 89, 182, 0.6));
}
#app {
background: white;
border: 0 none;
border-radius: 3px;
box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
padding: 20px 30px;
box-sizing: border-box;
text-align: center;
}
View Compiled
let app = new Vue({
el: '#app',
data () {
return {
firstName: 'Airen',
lastName: 'Liao'
}
},
methods: {
fullName: function (first, last) {
return first + ' ' + last
}
}
})
View Compiled
This Pen doesn't use any external CSS resources.