Vue
by kumarmasterpraveen
HTML
<div id="app">
<div class="container">
<div class="element" v-for="element in 20" :key="element">{{ element }}</div>
</div>
</div>
CSS
body {
background: #20262E;
padding: 20px;
font-family: Helvetica;
}
#app {
background: #fff;
border-radius: 4px;
padding: 20px;
transition: all 0.2s;
}
.container {
display: flex;
flex-direction: row;
padding-right: 50px; // not working
margin-right: 50px; // not working
}
.element {
margin: 16px;
min-width: 100px;
height: 100px;
background-color: #ddd;
border-radius: 10px;
}
Vue
new Vue({
el: "#app",
data: {
todos: [
{ text: "Learn JavaScript", done: false },
{ text: "Learn Vue", done: false },
{ text: "Play around in JSFiddle", done: true },
{ text: "Build something awesome", done: true }
]
},
methods: {
toggle: function(todo){
todo.done = !todo.done
}
}
})