小编UiU*_*iUx的帖子

如何从twitter-bootstrap中心.btn-group?

我正在使用twitter-bootstrap,我发现它很难集中在div哪个类.btn-group(链接).通常,我用

margin: 0 auto; 
Run Code Online (Sandbox Code Playgroud)

要么

text-align: center;
Run Code Online (Sandbox Code Playgroud)

在div中居中的东西,但是当内部元素具有float: left在这种情况下用于视觉效果的属性时它不起作用.

http://jsfiddle.net/EVmwe/1

html css css3 twitter-bootstrap

71
推荐指数
6
解决办法
8万
查看次数

如何在关闭Bootstrap 3模式时重新加载页面

我的目标是在Bootstrap模式关闭时重新加载页面.用户可以通过单击关闭按钮或图标或单击远离模态来关闭模态.

到目前为止,我的代码非常标准.取自:http: //getbootstrap.com/javascript/#modals

<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch
</button>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">My title</h4>
      </div>
      <div class="modal-body">
        My content
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save</button>
      </div>
    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

如何在关闭模式后重新加载页面?

更新:哇,来自每个人的惊人快速反应.谢谢

javascript jquery twitter-bootstrap twitter-bootstrap-3

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

AngularJS ng-controller无法正常工作

我刚刚开始从w3schools学习AngularJS .我正在尝试练习他们在教程中提到过的示例.一切正常,但是当我来到"AngularJS控制器"时,它在w3schools中运行良好并不能正常工作自己动手».我把我的代码分成了这个小提琴的例子.我的脚本看起来像这样:

function personController($scope) {
    $scope.firstName= "John";
    $scope.lastName= "Doe";
}
Run Code Online (Sandbox Code Playgroud)

尽量帮助我,并建议我一个很好的教程(或任何免费的PDF文件).

html javascript angularjs angularjs-controller

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

CSS从数组中选择一种随机颜色

CSS中是否有一种方法可以让它从数组中选择一种随机字体颜色?我知道我可以用服务器端或javascript做到这一点,但我想知道是否有纯CSS方式来做到这一点.

html css html5 css3

18
推荐指数
2
解决办法
6万
查看次数

Twitter Bootstrap 2:如何获得响应式设计,将侧边栏放在底部而不是顶部?

Twitter的Bootstrap 2最终添加了原生响应式设计.但是,默认情况下,当浏览器宽度低于最小宽度时,它会将侧边栏放在顶部.我可以看到这对于许多网站是如何工作的,但我实际上想要在小宽度布局的底部侧边栏.

我是Twitter Bootstrap的新手,并试图弄清楚CSS的哪个部分bootstrap-response.css,但我没有在部分中看到任何内容@media (max-width: 480px).

我查看了响应式设计的Bootstrap文档,但没有太多细节.

会喜欢一些指针......

twitter-bootstrap

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

Twitter Bootstrap Modal - 灰色背景但没有窗口

我在Twitter Bootstrap和模态的非JS示例中遇到了一个奇怪的问题,所发生的是模态背景出现(灰色)但窗口没有.

我发现如果我从模态窗口div中删除"隐藏"类,它将加载但不正确.

小提琴在这里:http://jsfiddle.net/2VbUG/1/

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="John Moss - Stolen Bikes UK">
    <title>Title</title>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">

    <!-- Optional theme -->
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">

    <!-- Custom styles for this template -->
    <link href="assets/css/style.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="assets/js/html5shiv.js"></script>
      <script src="assets/js/respond.min.js"></script>
    <![endif]--> …
Run Code Online (Sandbox Code Playgroud)

javascript jquery modal-dialog twitter-bootstrap

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

AngularJS/UI Bootstrap - 删除时淡出警报

我正在使用Angular和UI Bootstrap.我已经创建了自定义指令,将广播的alerst推送到绑定到视图的警报数组(呈现为Bootstrap警报).在特定超时后,警报将从阵列中删除(因此从视图中删除).这是代码:

angular.module('myApp')
  .directive('alerts', function ($timeout) {
    return {
      restrict: 'E',
      templateUrl: 'views/alerts.html',
      scope: true, /*share scope between alerts directives*/
      link: function (scope) {
        scope.alerts = [];

        scope.$on('alert', function (event, alert) {
          var newLength = scope.alerts.push({type: alert.type, msg: alert.message});

          $timeout(function() {
            scope.alerts.splice((newLength-1), 1);
          }, 3000);
        });
      }
    };
  });
Run Code Online (Sandbox Code Playgroud)

我想知道是否可以在删除之前为警报添加淡出(或实际上任何其他动画)?任何帮助和提示将不胜感激!

javascript angularjs angular-ui angularjs-directive angular-ui-bootstrap

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

在HTML5中放大图像而不模糊

有没有办法在HTML5中使图像更大而不会变得模糊.

例如,此图像为24x24: 在此输入图像描述

如果你用宽度为150加载它,它会变得模糊.我想要像素化!

http://png-1.findicons.com/files/icons/734/phuzion/24/bug.png

相反,我想改变渲染引擎,以显示你在photoshop中看到的内容.像这样的东西:

在此输入图像描述

我只关心现代浏览器.

html css html5 image css3

7
推荐指数
1
解决办法
200
查看次数

如何将nth-child()规则合并为一个?

我目前有这个长期规则

#content #wrapper table td:nth-child(3), 
#content #wrapper table td:nth-child(4), 
#content #wrapper table td:nth-child(5) {
     width: 30px;
}
Run Code Online (Sandbox Code Playgroud)

是否可以将第n个孩子组合成更短的东西nth-child(3,4,5)而不是3个单独的线?

html css html5 css3

6
推荐指数
1
解决办法
1157
查看次数

IE 8和IE 7中的HTML5标签

嗨,正如我在标题中提到的,在Firefox(萤火虫),IE-9/10,Chrome中它显示如下:

<footer>
    <div>...</div>
</footer>
Run Code Online (Sandbox Code Playgroud)

在IE-8/7中它显示如下:

<footer />
    <div>...</div>
</footer/>
Run Code Online (Sandbox Code Playgroud)

任何帮助表示赞赏.

html5 internet-explorer

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