小编PI.*_*PI.的帖子

复制Bootstraps主导航和子导航

我需要快速敲击twitter bootstraps主导航和子导航的功能,例如http://twitter.github.com/bootstrap/scaffolding.html(当你滚动subnav固定到那个主导航时)

有没有人实现这个或有任何教程?

javascript twitter-bootstrap

62
推荐指数
3
解决办法
3万
查看次数

Angular UI路由器 - 具有多个布局的嵌套状态

我想要有多个布局(1-col,2-col,3-col),我想根据所需的布局切换出不同的路径.

我目前有一个root状态默认使用某个布局,然后在该布局中包含用于页眉,页脚,侧边栏等部分的命名ui-view指令.

我只是想知道是否有可能更改嵌套状态的布局,因为它当前不起作用并且控制台或linter中没有错误出现.

我目前在浏览器中没有输出,这让我觉得我已经实现了错误的方法,因为所有路由都不是从路由状态继承的.

这是代码:

我-module.js

'use strict';

angular.module('my-module', ['ngResource', 'ui.router'])
  // Routing for the app.
  .config(function ($stateProvider, $urlRouterProvider) {
    $stateProvider
      .state('root', {
        url: '',
        views: {
          'layout': {
            templateUrl: 'partials/layout/1-column.html'
          },
          'header': {
            templateUrl: 'partials/layout/sections/header.html'
          },
          'footer': {
            templateUrl: 'partials/layout/sections/footer.html'
          }
        }
      })
      .state('root.home', {
        url: '/'
      })
      .state('root.signup', {
        url: '/signup',
        views: {
          'step-breadcrumb': {
            templateUrl: 'partials/signup/step-breadcrumb.html'
          }
        }
      })
      ;

    $urlRouterProvider.otherwise('/');
  })
  ;
Run Code Online (Sandbox Code Playgroud)

的index.html

<!doctype html>
<html class="no-js" ng-app="my-module">
  <head>
    <meta charset="utf-8">
    <title>My Test App</title>
    <meta name="description" …
Run Code Online (Sandbox Code Playgroud)

angularjs angular-ui-router

11
推荐指数
1
解决办法
2万
查看次数

Arial Black - Websafe字体?

Arial Black网络安全吗?

我已经读过了,但当我把它放在我的字体声明中时,我正被赋予Times New Roman.

有谁知道为什么?

fonts

7
推荐指数
3
解决办法
3万
查看次数

this.constructor.prototype.constructor.apply在js中的意思是什么

我正在读这篇文章,我无法弄清楚下面这行是做什么的.即使我删除这一行,我也看不出任何区别.

this.constructor.prototype.constructor.apply(this,Array.prototype.slice.call(arguments));

有人可以解释我为什么this.constructor.prototype.constructor有必要,不会this.constructor返回相同的价值?

javascript

5
推荐指数
1
解决办法
972
查看次数

HTML5日期验证

我正在寻找一个移动网站的验证,我有两个输入字段,我希望第一个验证价值不晚于今天的日期,第二个验证它不迟于提前一年第一个值.

例如

  • 第一个值= 26/11/2013
  • 第二个值不能包含晚于26/11/2014的值

这可能吗?

javascript regex html5

5
推荐指数
1
解决办法
1779
查看次数

Grunt - Watch Task无效

似乎我的项目grunt文件中的监视任务正在启动,然后立即退出.

请查看附带的屏幕截图.

请找到我的Gruntfile.js的代码;

module.exports = function (grunt) {

    grunt.initConfig({
        sass: {
            options: {
                cacheLocation: '.sass-cache'
            },
            prod: {
                options: {
                    style: 'compressed'
                },
                files: [{
                    'assets/css/dist/main.min.css': 'assets/css/sass/main.scss'
                }]
            },
            dev: {
                options: {
                    style: 'nested'
                },
                files: [{
                    'assets/css/main.css': 'assets/css/sass/main.scss'
                }]
            }
        },
        imageoptim: {
          files: [
            'img/flat',
            'img/flat/**'
          ],
          options: {
            imageAlpha: true,
            jpegMini: true,
            quitAfter: true
          }
        },
        uglify: {
            options: {
              mangle: true,
              compress: true
            },
            jsCompress: {
                files: {
                    'js/dist/main.min.js': ['js/src/script1.js', 'js/src/script2.js']
            }
          }
        },
        concat: …
Run Code Online (Sandbox Code Playgroud)

javascript gruntjs

4
推荐指数
1
解决办法
2万
查看次数