我想获得像Reddit或HackerNews投票那样的上/下箭头叠加的类似外观。我尝试过,而给了我下面来看看:如何显示向上/向下投票项目像Reddit?
我下面的代码给出:
HTML
<ul class="list-unstyled">
<li class="entry">
<div class="row">
<div class="col-sm-2 entry__rank">
<span class="pull-left">1.</span>
<i class="fa fa-icon fa-caret-up fa-2x pull-left"></i>
<i class="fa fa-icon fa-caret-down fa-2x pull-left"></i>
</div>
<div class="col-md-9">
<span class="entry__title">
<a href="#">This is a great billboard</a>
</span>
</div>
</div>
</li>
</ul>
CSS
.entry {
padding: 5px;
margin-bottom: 20px;
}
.entry__rank {
font-size: 20px;
font-weight: bold;
color: grey;
padding: 5px 0 5px 0;
margin-top: -10px !important;
}
.entry__title {
font-weight: bold;
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 16px;
}
.entry__title a {
color: #285ddf !important;
}
所需的外观
事件类似Stackover流程投票是可行的。
值。这不回答我的问题,因此没有帮助。我知道Reddit的来源。 – Volatil3
然后看看这个:http://janosgyerik.github.io/jquery-upvote/ – Dandy
这个插件很棒。用这些细节更新你的答案,我会接受它。 – Volatil3