<! DOCTYPE html>
<meta charset= "Utf-8" >
<meta http-equiv= "x-ua-compatible" content= "Ie=edge" >
<title></title>
<style>
* {
margin:0;
padding:0;
Box-sizing:border-box
}
HTML {
font-size:12px;
Font-family:ubuntu, Simhei, Sans-serif;
font-weight:400
}
Body {
Font-size:1rem
}
#app {
margin:0 Auto;
max-width:640px
}
. pagination {
Display:inline-block;
padding-left:0;
MARGIN:21PX 0;
border-radius:3px;
}
. pagination > Li {
Display:inline;
}
. pagination > li > a {
position:relative;
Float:left;
PADDING:6PX 12px;
line-height:1.5;
Text-decoration:none;
Color: #009a61;
Background-color: #fff;
border:1px solid #ddd;
Margin-left: -1px;
List-style:none;
}
. pagination > li > A:hover {
Background-color: #eee;
}
. Pagination. Active {
Color: #fff;
Background-color: #009a61;
Border-left:none;
Border-right:none;
}
. Pagination. Active:hover {
Background: #009a61;
Cursor:default;
}
. pagination > Li:first-child > A. P {
border-bottom-left-radius:3px;
border-top-left-radius:3px;
}
. pagination > Li:last-child > a {
border-bottom-right-radius:3px;
border-top-right-radius:3px;
}
</style>
<body>
<div id= "App" >
<ul class= "Pagination" >
<li v-for= "N in PageCount" >
<a href= "javascripit:void (0)": class= "activenumber = = = n + 1? ' Active ': ' ">{{n + 1}}</a>
</li>
</ul>
</div>
<script src= "Http://static.runoob.com/assets/vue/1.0.11/vue.min.js" ></script>
<script>
var vm = new Vue ({
El: "#app",
data:{
Activenumber:1,
Pagecount:10
}
});
</script>
</body>
Note:The v-bind instruction can be abbreviated to a colon
This article is from the "Yan" blog, please be sure to keep this source http://suyanzhu.blog.51cto.com/8050189/1895514
Vuejs11-v-bind instruction abbreviation