├── .gitignore ├── dist ├── 2.2.js.map ├── 2.2.js ├── 1.1.js └── 1.1.js.map ├── README.md ├── package.json ├── src ├── views │ ├── paged │ │ ├── toonelevel.vue │ │ ├── vfor.vue │ │ ├── paged.vue │ │ └── vmodel.vue │ ├── list.vue │ ├── home.vue │ ├── detail.vue │ └── tab.vue ├── app.vue └── app.js ├── gulpfile.js ├── index.html └── static └── styles └── mall.css /.gitignore: -------------------------------------------------------------------------------- 1 | *.xml 2 | *.iml 3 | node_modules/ 4 | .idea/ 5 | -------------------------------------------------------------------------------- /dist/2.2.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"2.2.js","sourcesContent":[],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/2.2.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([2],{ 2 | 3 | /***/ 83: 4 | /***/ function(module, exports) { 5 | 6 | 7 | 8 | /***/ } 9 | 10 | }); 11 | //# sourceMappingURL=2.2.js.map -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-spa-demo 2 | >DEMO说明 3 | 4 | 1. 新增v-bind v-model v-for 5 | 2. 演示常见需求:vuejs结合vue-router 配合transition指令动画 6 | 版本依赖 7 | 8 | * vuejs 1.0.0-rc.2 9 | * vue-router 0.7.5 10 | * ui部分为SUI 11 | 12 | >效果浏览 13 | 14 | (图片缓冲 稍等片刻) 15 | 16 | ![vue-spa-demo](http://7jpswm.com1.z0.glb.clouddn.com/vue-spavue-spa-demo-3.gif) 17 | 18 | >安装&使用方法 19 | 20 | 1. 直接使用:build文件夹及index.html即可为打包好的 21 | 2. npm install 22 | 3. gulp or gulp watch 23 | 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-spa-demo", 3 | "version": "1.0.0", 4 | "description": "seed-project-by vue", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "devDependencies": { 12 | "css-loader": "^0.19.0", 13 | "gulp": "^3.9.0", 14 | "gulp-webpack": "^1.5.0", 15 | "style-loader": "^0.12.4", 16 | "vinyl-named": "^1.1.0", 17 | "vue-html-loader": "^1.0.0", 18 | "vue-loader": "^3.0.4", 19 | "webpack": "^1.12.2" 20 | }, 21 | "dependencies": { 22 | "vue": "^1.0.0-rc.2", 23 | "vue-router": "^0.7.5" 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/views/paged/toonelevel.vue: -------------------------------------------------------------------------------- 1 | 27 | 37 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp') 2 | var webpack = require('gulp-webpack') 3 | var named = require('vinyl-named') 4 | 5 | 6 | var appList = ['app'] 7 | 8 | 9 | gulp.task('default', ['bundle'], function() { 10 | console.log('done') 11 | }) 12 | 13 | gulp.task('bundle', function() { 14 | return gulp.src(mapFiles(appList, 'js')) 15 | .pipe(named()) 16 | .pipe(webpack(getConfig())) 17 | .pipe(gulp.dest('dist/')) 18 | }) 19 | 20 | gulp.task('watch', function() { 21 | return gulp.src(mapFiles(appList, 'js')) 22 | .pipe(named()) 23 | .pipe(webpack(getConfig({watch: true}))) 24 | .pipe(gulp.dest('dist/')) 25 | }) 26 | 27 | 28 | /** 29 | * @private 30 | */ 31 | function getConfig(opt) { 32 | var config = { 33 | module: { 34 | loaders: [ 35 | { test: /\.vue$/, loader: 'vue'}, 36 | { test: /\.png$/, loader: "url-loader?mimetype=image/png" } 37 | ] 38 | }, 39 | devtool: 'source-map' 40 | } 41 | if (!opt) { 42 | return config 43 | } 44 | for (var i in opt) { 45 | config[i] = opt[i] 46 | } 47 | return config 48 | } 49 | 50 | /** 51 | * @private 52 | */ 53 | function mapFiles(list, extname) { 54 | return list.map(function (app) {return 'src/' + app + '.' + extname}) 55 | } -------------------------------------------------------------------------------- /src/app.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 31 | 32 | 42 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | VUEJS-SPA-DEMO 7 | 8 | 9 | 10 | 11 | 12 | 13 | 27 | 28 | 29 |
30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/views/list.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 40 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | // With proper loader configuration you can load, 2 | // pre-process and insert css directly with require(). 3 | // See webpack.config.js for details. 4 | var Vue = require('vue') 5 | var VueRouter = require('vue-router') 6 | Vue.use(VueRouter); 7 | 8 | var app = Vue.extend(require('./app.vue')) 9 | 10 | var router = new VueRouter({ 11 | hashbang: true //hash路由 12 | }) 13 | 14 | //路由表 15 | router.map({ 16 | '/home': { 17 | component: require('./views/home.vue') 18 | }, 19 | '/B': { 20 | component: require('./views/list.vue'), 21 | //子路由 22 | subRoutes:{ 23 | 'detail/:giftId': { 24 | name: 'detail', //具名路由 25 | component: require('./views/detail.vue') 26 | } 27 | } 28 | }, 29 | '/C': { 30 | component: require('./views/tab.vue') 31 | }, 32 | '/D': { 33 | component: require('./views/paged/paged.vue'), 34 | subRoutes: { 35 | '/toonelevel': { 36 | component: require('./views/paged/toonelevel.vue') 37 | }, 38 | '/vfor': { 39 | component: require('./views/paged/vfor.vue') 40 | }, 41 | '/vmodel': { 42 | component: require('./views/paged/vmodel.vue') 43 | } 44 | } 45 | } 46 | }) 47 | 48 | //默认/重定向到home页 49 | router.redirect({ 50 | '/':"/home" 51 | }) 52 | //注册路由切换前 53 | //使底部菜单栏在一级路由切换时一直保持显示 54 | //在二级页时隐藏 55 | router.beforeEach(function (transition) { 56 | var toPath = transition.to.path; 57 | console.info() 58 | if(toPath.replace(/[^/]/g,"").length>1){ 59 | router.app.isIndex = false; 60 | }else{ 61 | router.app.isIndex = true; 62 | } 63 | transition.next() 64 | }) 65 | //注册路由切换后 66 | router.afterEach(function (transition) { 67 | console.log('成功浏览到: ' + transition.to.path) 68 | $.refreshScroller(); 69 | }) 70 | 71 | router.start(app, '#app'); 72 | //暴漏路由调试接口 73 | window.router = router; -------------------------------------------------------------------------------- /dist/1.1.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([1],{ 2 | 3 | /***/ 83: 4 | /***/ function(module, exports, __webpack_require__) { 5 | 6 | __webpack_require__(84) 7 | module.exports = __webpack_require__(86) 8 | module.exports.template = __webpack_require__(87) 9 | 10 | 11 | /***/ }, 12 | 13 | /***/ 84: 14 | /***/ function(module, exports, __webpack_require__) { 15 | 16 | // style-loader: Adds some css to the DOM by adding a 6 | 7 | 40 | 41 | 62 | -------------------------------------------------------------------------------- /src/views/paged/vfor.vue: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /dist/1.1.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./src/views/gift.vue","webpack:///./src/views/gift.vue?6ad0","webpack:///./src/views/gift.vue?df10","webpack:///./src/views/gift.vue?646e"],"names":[],"mappings":";;;;;AAAA;AACA;AACA;;;;;;;;ACFA;;AAEA;AACA;AACA;AACA;AACA,iDAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,iCAAgC,UAAU,EAAE;AAC5C,E;;;;;;;ACpBA;AACA;;;AAGA;AACA,kCAAiC,2BAA2B,OAAO;;AAEnE;;;;;;;;;;;;;;;ACPA,oC","file":"1.1.js","sourcesContent":["require(\"-!style!css!./../../node_modules/vue-loader/lib/selector.js?type=style&index=0!./gift.vue\")\nmodule.exports = require(\"-!./../../node_modules/vue-loader/lib/selector.js?type=script&index=0!./gift.vue\")\nmodule.exports.template = require(\"-!vue-html!./../../node_modules/vue-loader/lib/selector.js?type=template&index=0!./gift.vue\")\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/views/gift.vue\n ** module id = 83\n ** module chunks = 1\n **/","// style-loader: Adds some css to the DOM by adding a 3 | 4 | 46 | 47 | 99 | -------------------------------------------------------------------------------- /src/views/paged/vmodel.vue: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /src/views/tab.vue: -------------------------------------------------------------------------------- 1 | 107 | 108 | -------------------------------------------------------------------------------- /static/styles/mall.css: -------------------------------------------------------------------------------- 1 | img { 2 | display: block; 3 | } 4 | .card_my { 5 | /*height:4rem;*/ 6 | background-color:#515CE9; 7 | } 8 | .card_my .card{ 9 | margin: 0px!important; 10 | } 11 | .card_my .card-content-inner { 12 | padding: 0 .75rem!important; 13 | } 14 | .card_my .card-content-inner p{ 15 | margin: 0px !important; 16 | } 17 | #my { 18 | /*margin: 0px!important;*/ 19 | height: 100%; 20 | background-color: #ffffff; 21 | } 22 | .list-item__left, 23 | .list-item__right { 24 | height:8rem; 25 | background-color:#FFF; 26 | border-bottom: 1px #f0f0f0 solid; 27 | } 28 | .list-item__left { 29 | border-right: 1px #f0f0f0 solid; 30 | -webkit-box-sizing: border-box; 31 | } 32 | 33 | .state_grey { 34 | background-color: #ccc; 35 | } 36 | .state_org { 37 | background-color: #515CE9; 38 | } 39 | .state { 40 | display: inline-block; 41 | height: 14px; 42 | line-height: 14px; 43 | padding: 0 3px; 44 | color: #fff; 45 | border-radius: 2px; 46 | font-size: .6rem; 47 | } 48 | .list-item__info { 49 | margin-bottom:0px; 50 | } 51 | .list-item__info p { 52 | height: 16px; 53 | line-height: 16px; 54 | white-space: nowrap; 55 | overflow: hidden; 56 | text-overflow: ellipsis; 57 | margin:.2rem 0px; 58 | font-family: STHeiTi-Light,'Microsoft YaHei',arial,sans-serif,'Droid Sans Fallback'; 59 | } 60 | .per_count { 61 | display: inline-block; 62 | width: 11px; 63 | height: 10px; 64 | background: url(http://static.xiaojukeji.com/activity/img-mall/per_count.png) right bottom no-repeat; 65 | background-size: 8px 10px; 66 | position: relative; 67 | top: 1px; 68 | } 69 | .list-item__info p:nth-child(3) { 70 | color: #515CE9; 71 | font-size: .6rem; 72 | } 73 | .list-item__info p:nth-child(2) { 74 | font-size: .75rem; 75 | color: #666; 76 | } 77 | .list-item__info p:nth-child(1) { 78 | color: #989898; 79 | font-size: .6rem; 80 | } 81 | .mod_img { 82 | width: 110px; 83 | height: 75px; 84 | margin: auto; 85 | overflow: hidden; 86 | padding: 4.5px 0; 87 | } 88 | .address-phone__contents { 89 | font-size:.7rem; 90 | } 91 | .circle_box { 92 | width: 100%; 93 | /* height: 158px; */ 94 | text-align: center; 95 | /* padding-top: 20px; */ 96 | /* position: fixed; */ 97 | left: 0; 98 | top: 0; 99 | background-color: #fff; 100 | /* z-index: 100; */ 101 | } 102 | 103 | .circle_top { 104 | width: 100%; 105 | } 106 | 107 | .circle { 108 | width: 80px; 109 | height: 80px; 110 | display: inline-block; 111 | border-radius: 51px; 112 | border: 1px solid #515CE9; 113 | background-clip: padding-box; 114 | background-color: #515CE9; 115 | color: #fff; 116 | position: relative; 117 | -webkit-animation: bounceIn .5s .1s ease both; 118 | top: 10px; 119 | } 120 | 121 | @-webkit-keyframes bounceIn { 122 | 0% { 123 | opacity: 0; 124 | -webkit-transform: scale(.3) 125 | } 126 | 127 | 50% { 128 | opacity: 1; 129 | -webkit-transform: scale(1.05) 130 | } 131 | 132 | 70% { 133 | -webkit-transform: scale(.9) 134 | } 135 | 136 | 100% { 137 | -webkit-transform: scale(1) 138 | } 139 | } 140 | 141 | .text_box { 142 | width: 100%; 143 | height: 48px; 144 | position: absolute; 145 | top: 50%; 146 | margin-top: -24px 147 | } 148 | 149 | .text_box .text { 150 | font-size: 16px; 151 | margin: 0px!important; 152 | } 153 | 154 | .count { 155 | font-size: 16px; 156 | margin: 0px; 157 | } 158 | 159 | .rule { 160 | display: inline-block; 161 | width: 65px; 162 | height: 40px; 163 | line-height: 40px; 164 | background: url(http://static.xiaojukeji.com/activity/img-mall/my_count.png) left center no-repeat; 165 | background-size: 14px 14px; 166 | position: fixed; 167 | top: 2px; 168 | right: 0; 169 | z-index: 200; 170 | padding-left: 17px; 171 | color: #878787; 172 | font-size: 1.2rem 173 | } 174 | 175 | .select { 176 | padding-top: 10px 177 | } 178 | 179 | .select a { 180 | margin: 0 10px; 181 | border-radius: 4px; 182 | border: 1px solid #f0f0f0; 183 | display: inline-block; 184 | color: #878787; 185 | font-size: 0.75rem; 186 | position: relative; 187 | z-index: 200 188 | } 189 | 190 | .select span { 191 | width: 93px; 192 | height: 30px; 193 | line-height: 30px; 194 | display: inline-block; 195 | background-size: 11px 10px; 196 | padding-left: -4px; 197 | text-align: center; 198 | position: relative; 199 | left: 10px 200 | } 201 | 202 | .shop { 203 | background: url(http://static.xiaojukeji.com/activity/img-mall/shop.png) 4px center no-repeat 204 | } 205 | .help { 206 | background: url(http://static.xiaojukeji.com/activity/img-mall/my_count.png) 4px center no-repeat 207 | } 208 | 209 | .record { 210 | background: url(http://static.xiaojukeji.com/activity/img-mall/my_record2.png) 4px center no-repeat 211 | } 212 | 213 | .area { 214 | height: 27px; 215 | padding-top: 12px; 216 | background-color: #fff; 217 | } 218 | 219 | .line { 220 | width: 90%; 221 | height: 4px; 222 | border-bottom: 1px #e6e6e6 solid; 223 | text-align: center; 224 | margin: 0 auto 225 | } 226 | 227 | .line span { 228 | width: 77px; 229 | height: 11px; 230 | line-height: 20px; 231 | display: inline-block; 232 | background: #fff; 233 | color: #ccc; 234 | font-size: 16px; 235 | position: relative; 236 | top: -10px; 237 | } 238 | 239 | .opacity { 240 | height: 10px; 241 | background: url(http://static.diditaxi.com.cn/activity/img-mall/opacity.png) left center no-repeat 242 | } 243 | 244 | 245 | .list { 246 | width: 100%; 247 | margin: 0 auto; 248 | overflow-y: auto; 249 | -webkit-overflow-scrolling: touch; 250 | overflow: hidden; 251 | background-color: #fff; 252 | /*padding: 183px 5% 0*/; 253 | padding: 0px 15px 0px 15px !important; 254 | } 255 | 256 | .list li { 257 | display: -webkit-box; 258 | /*height: 56px;*/ 259 | border-bottom: 1px #ebebeb solid 260 | } 261 | 262 | .list li div { 263 | -webkit-box-flex: 2 264 | } 265 | .list li:last-child { 266 | border-bottom: 0px; 267 | } 268 | 269 | .list li h3 { 270 | color: #666; 271 | font-size: 0.75rem; 272 | height: 32px; 273 | line-height: 32px; 274 | /*padding-top: 7px;*/ 275 | font-weight: 400; 276 | margin: 0px !important; 277 | padding-top: 7px!important; 278 | } 279 | 280 | .list li p { 281 | color: #999; 282 | font-size: 0.5rem; 283 | margin: 0px!important; 284 | } 285 | 286 | .pre_count { 287 | text-align: right; 288 | line-height: 56px; 289 | color: #515CE9; 290 | /*font-size: 1.4rem*/ 291 | } 292 | 293 | .pre_green { 294 | color: #52b786 295 | } 296 | 297 | .btn-orange { 298 | cursor: default; 299 | display: inline-block; 300 | width: 100%; 301 | height: 41px; 302 | line-height: 41px; 303 | border-radius: 5px; 304 | background-color: #515CE9; 305 | color: #fff; 306 | font-size: 1.6rem; 307 | font-weight: 600; 308 | text-decoration: none 309 | } 310 | 311 | .btn-white { 312 | cursor: default; 313 | display: inline-block; 314 | width: 100%; 315 | height: 41px; 316 | line-height: 41px; 317 | border-radius: 5px; 318 | background-color: #fefefe; 319 | border: .1rem solid #d7d7d7; 320 | color: #666; 321 | font-size: 1.6rem; 322 | font-weight: 600; 323 | text-decoration: none 324 | } 325 | 326 | .btn-orange:active { 327 | background-color: #df7800 328 | } 329 | 330 | .btn-white:active { 331 | background-color: #e9e9e9 332 | } 333 | 334 | .foo_opacity { 335 | background-color: #fff 336 | } 337 | .my-menu-1{ 338 | margin:0px!important; 339 | } 340 | .logo-line{ 341 | 342 | } 343 | .logo-line img{ 344 | width: 56px; 345 | height: 56px; 346 | } 347 | .logo-line #level-head { 348 | width: 80px; 349 | height: 80px; 350 | } 351 | .logo-line span{ 352 | line-height: 38px; 353 | } 354 | 355 | .logo-line .score{ 356 | color: #fd306b; 357 | font-weight: bolder; 358 | font-size: 20px; 359 | } 360 | 361 | .personalinfo { 362 | overflow:initial; 363 | } 364 | 365 | .personalinfo .list-block{ 366 | margin:0px!important; 367 | } 368 | .task { 369 | padding: 0px !important; 370 | margin: 0px!important; 371 | } 372 | .task .tab .content-block { 373 | padding: 0px !important; 374 | margin: 0px!important; 375 | } 376 | /*任务状态表示框*/ 377 | .task_flag,.default_flag { 378 | position: absolute; 379 | width: 10px; 380 | height: 100%; 381 | } 382 | /*红色-未完成*/ 383 | .task_unfin,.default_flag { 384 | background-color: #515CE9; 385 | } 386 | 387 | /*绿色-完成*/ 388 | .task_fin { 389 | background-color: #60d948; 390 | } 391 | 392 | /*蓝色-可领取*/ 393 | .task_can { 394 | background-color: #688fd9; 395 | } 396 | #my-coupon .card-content-inner { 397 | padding: 0.2rem 0 0.3rem 0.8rem !important; 398 | } 399 | #my-coupon .card-content-inner p { 400 | margin:0px !important; 401 | } 402 | #my-address .content-block-title { 403 | margin: 0.75rem 0.75rem .5rem!important; 404 | } 405 | #my-change .list-block .item-text { 406 | height: auto!important; 407 | } 408 | #gift-detail .content { 409 | background-color: #fff!important; 410 | } 411 | /*复写部分-sm样式*/ 412 | .color-default { 413 | color: #4cd964!important; 414 | } 415 | .color-edit { 416 | color: #688fd9!important; 417 | } 418 | 419 | /*复写部分-end*/ 420 | 421 | 422 | .gift-cover { 423 | width: 100%!important; 424 | } 425 | 426 | .describe { 427 | width: 100%; 428 | height: 54px; 429 | line-height: 54px; 430 | font-size: 1.4rem; 431 | background-color: rgba(255,255,255,.9); 432 | border-bottom: 1px solid #ebebeb; 433 | border-top: 1px solid #ebebeb; 434 | } 435 | 436 | .describe h3 { 437 | padding-left: 4%; 438 | float: right; 439 | color: #333; 440 | font-weight: 400 441 | } 442 | 443 | .describe span:nth-child(1) { 444 | background: url(http://static.xiaojukeji.com/activity/img-mall/detail_count.png) right 28px no-repeat; 445 | background-size: 8px 9.5px; 446 | float: left; 447 | color: #515CE9; 448 | margin-left: 5%; 449 | margin-right: 4px; 450 | padding-right: 10px; 451 | /*font-size: 3rem*/ 452 | } 453 | .btn-org { 454 | width: 65%; 455 | display: inline-block; 456 | text-align: center; 457 | cursor: default; 458 | height: 34px; 459 | line-height: 34px; 460 | border-radius: 5px; 461 | color: #fff!important; 462 | font-size: 1.1rem; 463 | text-decoration: none; 464 | margin: 10px 6% 10px auto; 465 | -webkit-tap-highlight-color: rgba(0,0,0,.2); 466 | background-color: #515CE9; 467 | float: right 468 | } 469 | .btn-gray { 470 | width: 65%; 471 | display: inline-block; 472 | text-align: center; 473 | cursor: default; 474 | height: 34px; 475 | line-height: 34px; 476 | border-radius: 5px; 477 | color: #fff!important; 478 | font-size: 1.1rem; 479 | text-decoration: none; 480 | margin: 10px 6% 10px auto; 481 | -webkit-tap-highlight-color: rgba(0,0,0,.2); 482 | background-color: #e0e0e0; 483 | float: right 484 | } 485 | .main { 486 | background-color: #fff; 487 | padding: 0 4% 0; 488 | word-wrap: break-word; 489 | -webkit-user-select: auto; 490 | border: 0px; 491 | } 492 | 493 | .main div,a,b,canvas,dd,dl,dt,em,form,h1,h2,h3,h4,h5,h6,hr,img,input,label,li,ol,p,q,span,ul { 494 | -webkit-user-select: text 495 | } 496 | 497 | .main p img { 498 | width: 100% 499 | } 500 | .main p { 501 | margin: 0!important; 502 | font-size: 0.75rem!important; 503 | color: #000; 504 | } 505 | 506 | .popup-rank .content-block { 507 | margin:2.5rem 0 !important; 508 | padding: 0px !important; 509 | } 510 | .popup-rank .content-block .item-title,.task .item-title { 511 | width: 100%!important; 512 | overflow: visible!important; 513 | } 514 | .popup-rank .content-block .item-title .right_span, .task .item-title .right_span{ 515 | position: absolute; 516 | right: 0px; 517 | font-size: 0.745rem; 518 | } 519 | .task .button-danger { 520 | color: #688fd9!important; 521 | border-color: #688fd9!important; 522 | } 523 | .content_count { 524 | color: #ccc; 525 | background: url(http://static.xiaojukeji.com/activity/img-mall/per_count.png) right center no-repeat; 526 | background-size: 8px 10px; 527 | padding-right: 10px; 528 | padding-left: 10px; 529 | } 530 | .font_little { 531 | color: #666; 532 | font-size:0.75rem; 533 | } 534 | .orange { 535 | color: #515CE9; 536 | font-weight: 400; 537 | } 538 | .expire { 539 | font-size: 0.5rem; 540 | } 541 | .fixTop { 542 | position: fixed; 543 | top:0; 544 | } 545 | .img_head { 546 | position: relative; 547 | } 548 | .gradients { 549 | width: 100%; 550 | height: 80px; 551 | background-image: -webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.5))); 552 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#BDD738, endColorstr=#7E9516); 553 | -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#BDD738,endColorstr=#7E9516)"; 554 | position: absolute; 555 | bottom: 0 556 | } 557 | 558 | .gradients p { 559 | color: #fff; 560 | padding-left: 4% 561 | } 562 | 563 | .gradients p:nth-child(1) { 564 | font-size: 0.75rem; 565 | position: absolute; 566 | bottom: 25px; 567 | margin: 0px!important; 568 | } 569 | 570 | .gradients p:nth-child(2) { 571 | font-size: 1rem; 572 | position: absolute; 573 | bottom: 0px; 574 | margin: 0px!important; 575 | } 576 | .border { 577 | border-bottom: 1px solid #fff; 578 | word-break: break-all 579 | } 580 | 581 | .declare { 582 | text-align: center; 583 | width: 92%; 584 | border: 1px dashed #999; 585 | border-radius: 5px; 586 | margin: 18px 3% 20px; 587 | position: relative 588 | } 589 | 590 | .declare p { 591 | font-size: 0.75rem; 592 | color: #333; 593 | position: absolute; 594 | top: -26px; 595 | left: 47%; 596 | margin-left: -35px; 597 | padding: 0 12px; 598 | background-color: #fff; 599 | } 600 | 601 | .declare_cont { 602 | text-align: left; 603 | font-size: 0.5rem; 604 | color: #666; 605 | line-height: 18px 606 | } 607 | 608 | .declare_cont div:nth-child(1) { 609 | padding: 18px 7% 10px 610 | } 611 | 612 | .declare_cont div:nth-child(2) { 613 | border-top: 1px dashed #999; 614 | padding: 10px 7% 615 | } 616 | .num_container { 617 | position: relative; 618 | width: 80px; 619 | height: 80px; 620 | margin: 0 auto; 621 | } 622 | .num { 623 | width: 80px; 624 | height: 80px; 625 | font-size: 60px; 626 | font-weight: 600; 627 | position: absolute; 628 | background-color: #515CE9; 629 | line-height: 80px; 630 | text-align: center; 631 | border-radius: 10px; 632 | color: #fff; 633 | } 634 | 635 | .flipover { 636 | animation: flipover-top 0.5s ease-in 0.5s 1 alternate; 637 | animation-fill-mode: forwards; 638 | } 639 | 640 | @-webkit-keyframes flipover-top { 641 | 0% { 642 | -webkit-transform: rotateX(0deg); 643 | } 644 | 50% { 645 | /*height: 12px;*/ 646 | -webkit-transform: rotateX(90deg); 647 | } 648 | 100% { 649 | opacity: 0; 650 | -webkit-transform: rotateX(90deg); 651 | } 652 | } 653 | 654 | .translateToLeft { 655 | animation: toLeft 0.3s ease-in 0s 1 alternate; 656 | animation-fill-mode: forwards; 657 | } 658 | 659 | @-webkit-keyframes toLeft { 660 | 0% { 661 | -webkit-transform: translateX(0px); 662 | } 663 | 100% { 664 | -webkit-transform: translateX(-80px); 665 | } 666 | } 667 | 668 | 669 | /*淡进-从下到上*/ 670 | @-webkit-keyframes fadeUp { 671 | 0% { 672 | -webkit-transform: translate(0, -40px); 673 | opacity: 0 674 | } 675 | 100% { 676 | -webkit-transform: translate(0px, 0); 677 | opacity: 1 678 | } 679 | } 680 | .sloganFadeUp { 681 | -webkit-animation: fadeUp 0.2s linear both 0.1s; 682 | } 683 | 684 | .grid-item { 685 | text-align: center; 686 | height: 80px; 687 | line-height: 80px; 688 | border-right: 1px solid #e6e6e6; 689 | border-bottom: 1px solid #e6e6e6; 690 | } 691 | 692 | .avatar img { 693 | width: 56px; 694 | height: 56px; 695 | border-radius: 100%; 696 | border: 1px solid #fff; 697 | } 698 | .avatar_name { 699 | color: #ffffff; 700 | line-height: 56px; 701 | } 702 | .card_my .card-content { 703 | background-color: #515CE9; 704 | } 705 | .rule { 706 | display: inline-block; 707 | width: 70px; 708 | height: 40px; 709 | line-height: 40px!important; 710 | background: url(http://static.xiaojukeji.com/activity/img-mall/per_count.png) left center no-repeat; 711 | background-size: 14px 14px; 712 | margin-right: 10px; 713 | color: #ffffff; 714 | font-size: 10px; 715 | 716 | /*position: relative;*/ 717 | /*/!* display: inline-block; *!/*/ 718 | /*/!* width: 65px; *!/*/ 719 | /*/!* height: 40px; *!/*/ 720 | /*/!* line-height: 40px!important; *!/*/ 721 | /*background: url(http://static.xiaojukeji.com/activity/img-mall/my_count.png) left center no-repeat;*/ 722 | /*background-size: 14px 14px;*/ 723 | /*margin-right: 10px;*/ 724 | /*color: #ffffff;*/ 725 | /*font-size: 10px;*/ 726 | /*top: -12px;*/ 727 | } 728 | .avatar_row { 729 | padding: 10px 0px 10px 0px; 730 | } 731 | 732 | .level_txt { 733 | /* line-height: 56px; */ 734 | text-align: center; 735 | /* right: 0px; */ 736 | width: 30%; 737 | /* opacity: 0.2; */ 738 | background-color: rgba(236, 127, 153, 0.52); 739 | border-radius: 10px 0px 0px 10px; 740 | position: absolute; 741 | right: 0px; 742 | top: 45px; 743 | color: #ffffff; 744 | } 745 | .card_my_2 .card{ 746 | margin: 0px!important; 747 | } 748 | .card_my_2 .card-content-inner { 749 | padding: 0 .75rem!important; 750 | } 751 | .card_my_2 .card-content{ 752 | background-color: rgba(233, 83, 119, 0.5); 753 | } 754 | 755 | .card_my_2 .card-content-inner p{ 756 | margin: 0px !important; 757 | } 758 | .card_my_2 { 759 | /*margin-top: 1px;*/ 760 | text-align: center; 761 | color: #FFFBFB; 762 | } --------------------------------------------------------------------------------