小编Erm*_*bel的帖子

更改列表的项目符号颜色

我有一个清单,

    <ul class="listStyle">
        <li>
            <strong>View :</strong> blah blah.
        </li>
        <li>
            <strong>Edit :</strong> blah blah blah.
        </li>
    </ul>
Run Code Online (Sandbox Code Playgroud)

我正在使用方形子弹列表.

    .listStyle{
        list-style-type: square;
    }
Run Code Online (Sandbox Code Playgroud)

子弹呈黑色.是否有可能改变子弹的颜色?如果是,我该如何改变它?

请帮忙,谢谢

css

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

AngularJs:$ http同步调用

我有一个API调用服务如下,

    getValue: function(input) {
        var deferred, url;
        deferred = $q.defer();
        url = "url";
        $http.post(url, input).success(function(data, status, headers, config) {
          return deferred.resolve({
            success: true,
            data: data,
            status: status,
            headers: headers,
            config: config
          });
        }).error(function(data, status, headers, config) {
          return deferred.resolve({
            success: false,
            data: data,
            status: status,
            headers: headers,
            config: config
          });
        });
        return deferred.promise;
      }
Run Code Online (Sandbox Code Playgroud)

但这是异步的.如何将其转换为同步(我想让它等到我得到结果)?

javascript synchronous angularjs

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

显示模态弹出基础:防止关闭弹出窗口

我正在使用reveal-modal popup http://foundation.zurb.com/docs/components/reveal.html.

是否存在内置方法以防止关闭esc键上的弹出窗口.或者我怎样才能让它发挥作用?

我试过以下,

    $(document).keyup(function(e) {
      if (e.keyCode === 27) {
        return e.preventDefault();
      }
    });
Run Code Online (Sandbox Code Playgroud)

链接到打开弹出窗口

    <a class="action icon-primary" id="manageAccess" ng-click="Popup()"><img src="images/Manage_Access_Icon.svg"/>Access Pop up</a>
Run Code Online (Sandbox Code Playgroud)

弹出

    <div id="AccessContainer" class="reveal-modal large" data-reveal data-options="close_on_background_click:false;">
        //contents inside pop-up
        <a class="close-reveal-modal">&#215;</a> // wil close pop-up
    </div>

    $scope.Popup = function() {
      return $("#AccessContainer").foundation("reveal", "open");
    };
Run Code Online (Sandbox Code Playgroud)

在foundation.reveal.js

settings : {
  animation: 'fadeAndPop',
  animation_speed: 250,
  close_on_background_click: true,
  close_on_esc: true, // how can i change this from my js
  dismiss_modal_class: 'close-reveal-modal',
  bg_class: 'reveal-modal-bg',
  open: function(){},
  opened: function(){}, …
Run Code Online (Sandbox Code Playgroud)

javascript jquery popup zurb-foundation

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

如果搜索字段具有值,则为addclass:Angularjs

我有一个搜索输入字段和一个列表框,

    <input type="text"  class="inputSearch" placeholder="Search" ng-model="searchRoleOne"/>
    <i class="fa fa-search"></i>                                                         
    <select multiple class="listMutiple top5" ng-model="selectedRoleValue">
        <option ng-selected="selectrole" ng-repeat="role in roles | filter:searchRoleOne" value="{{role}}">{{role}}</option>      
    </select>
Run Code Online (Sandbox Code Playgroud)

我需要addclass说

    .addClear{
        background: url(../images/Close.png) no-repeat right -10px center;
        background-repeat: no-repeat;
        background-position: right 5px center;
    }
Run Code Online (Sandbox Code Playgroud)

只要有文字,我就应该在改变功能上发生.点击.addClear类搜索字段应该为空,ng模型也是如此.

我怎样才能做到这一点?

我尝试ng-class="{'addClear': searchRoleOne}"在搜索字段中使用.它工作不正常.

javascript css select angularjs angularjs-ng-class

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

边框线旁边的文字

我有ap标签.我想在它旁边有一条边界线.

<p style="margin-left: -30px;font-size: 12px;margin-bottom: 2px;"><strong> Categories</strong></p>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我想在p标签旁边添加一行作为下图.

我该如何实现它?

请帮忙,谢谢

html css border

2
推荐指数
2
解决办法
1520
查看次数