H2标签内的跨度未显示

时间:2015-10-12 03:41:49

标签: html css caret html-heading

我试图在H2标签内添加一个跨度,该标签将显示下拉菜单,但我尝试的所有内容都无法进行渲染。当我查看开发人员控制台时,我的范围甚至都没有显示出来。看起来它甚至没有被渲染。我需要覆盖H2样式中的某些东西吗?我无法找到它。

HTML

<h2 class="panel-title">Drilldown<span style="float:right" class="down_caret" id="drilldown_caret"></span></h2>

H2 for H2

.dashboard-row .dashboard-panel h2.panel-title {
    font-size: 20px;
    margin: 0;
    padding: 5px 55px 5px 10px;
    font-weight: 200;
    border-bottom: 1px dotted #ccc;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
h2, h3 {
    line-height: normal;
}
h2 {
    font-size: 27px;
}
h1, h2, h3 {
    line-height: 32px;
}
h1, h2, h3, h4, h5, h6 {
    margin: 8px 0;
    font-family: inherit;
    font-weight: bold;
    line-height: 16px;
    color: inherit;
    text-rendering: optimizelegibility;
}
user agent stylesheeth2 {
    display: block;
    font-size: 1.5em;
    -webkit-margin-before: 0.83em;
    -webkit-margin-after: 0.83em;
    -webkit-margin-start: 0px;
    -webkit-margin-end: 0px;
    font-weight: bold;
}

CSS for span class
.down_caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 10px;
  vertical-align: middle;
  border-top: 6px solid #000000;
  border-right: 6px solid transparent;
  border-bottom: 0 dotted;
  border-left: 6px solid transparent;
  content: "";
}  

0 个答案:

没有答案