【问题标题】:Page level masking with bootstrap and css style on button按钮上带有引导程序和 css 样式的页面级掩码
【发布时间】:2015-12-18 01:32:24
【问题描述】:

我不擅长css,但这就是我想要的和我尝试过的。

<div>
    <div id="propertiesTable" style="padding: 20px 20px 20px 20px;" ng-cloak >
        <table class="table table-striped table-bordered">
            <tbody>

                <tr data-ng-repeat="(k,v) in properties">
                    <td>{{ k }}</td>
                    <td>{{ v }}</td>
                </tr>
            </tbody>
        </table>
    </div>
    <div style="padding-left: 20px;">
        <button type="submit" class="btn btn-primary btn-sm"
            title="Refresh for updated properties"
            ng-click="onRefreshButtonClick()">
            <span class="glyphicon glyphicon-refresh">Refresh</span>
        </button>
        </span>
    </div>
</div>

所以,我在 class="btn btn-primary btn-sm" 中有这个杂乱的按钮 glyphicon glyphicon-refresh

我需要在这两者之间留一些空间。当我尝试填充样式时,它不起作用。显然,padding 已应用于整个按钮!

  1. 如何在glyphicon glyphicon-refreshclass="btn btn-primary btn-sm" 之间实现填充?
  2. 当我点击刷新时,我希望id:propertiesTable 被屏蔽(这意味着这部分的光线暗淡)。这是可以实现的吗?

很抱歉这个问题。不擅长 CSS。

感谢 Stackoverflow!

【问题讨论】:

  • 将您的问题分成 2 个完全不同的问题。 1号与2号无关

标签: css angularjs html twitter-bootstrap-3


【解决方案1】:

您可以只添加一个不间断的空格:http://jsfiddle.net/mm6ck3dc/9/

&lt;span class="glyphicon glyphicon-refresh"&gt;&amp;nbsp;Refresh&lt;/span&gt;

【讨论】:

  • 那是很好的亚当。我会将第二部分作为另一个问题发布。谢谢!
  • 如果你想使用它,这里有一个 javascript 中的暗淡。 jsfiddle.net/mm6ck3dc/10
猜你喜欢
  • 1970-01-01
  • 2021-01-20
  • 1970-01-01
  • 2017-11-24
  • 2012-09-12
  • 2013-01-22
  • 2014-04-02
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多