如何在所需位置制作标签?

时间:2019-03-31 14:05:26

标签: javascript php html label navbar

我想制作一个通知栏并在上面添加一些标签,但是标签没有按照我想要的位置放置。

我该如何解决?

<li class="nav-item dropdown nav-user">
 <a class="nav-link nav-user-img" href="#" id="navbarDropdownMenuLink3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="fa fa-envelope" style="color: #82849f"></span> &nbsp <span class="navbarDropdownMenuLink2 fa fa-sort-down" style="color: #82849f"></span 
 </a>
 <div class="dropdown-menu dropdown-menu-right nav-user-dropdown" aria-labelledby="navbarDropdownMenuLink3">
  <ul class="dropdown-item" style="list-style: none;">           
   <?php foreach($total as $t){
    $tot = $t->total;
    if($tot != 0){
     echo '<span class="label label-pill label-danger count" style="border-radius:10px;">';
     echo $t->total;
     echo '</span>';
    }else{
     echo ' ';
    }                        
    }?>

0 个答案:

没有答案