bootstrap star-rating插件错误图标

时间:2015-12-13 12:48:24

标签: javascript twitter-bootstrap-3

插件网址:http://plugins.krajee.com/star-rating

我使用默认选项初始化插件,但显示的图标似乎被其他内容覆盖。

enter image description here

的Javascript

$("#rating").rating();

HTML

<div class="row">
  <div class="col-md-offset-1 col-md-10 ">
    <div class="form-group">
      <label for="rating">Rating</label>
      <input type="number" data-step="1" class="form-control rating" name="rating" id="rating"/>
    </div>
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

确保您已将所有必需资源(js,css)包含在库中的基本示例中,如https://github.com/kartik-v/bootstrap-star-rating#user-content-usage

<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="path/to/css/star-rating.min.css" media="all" rel="stylesheet" type="text/css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="path/to/js/star-rating.min.js" type="text/javascript"></script>