【发布时间】:2018-07-10 12:17:36
【问题描述】:
我正在关注这些页面来创建一条水平线: horizontal line and right way to code it in html, css
http://www.w3schools.com/tags/tag_hr.asp
http://www.jacklmoore.com/notes/jquery-tabs/
但它似乎在我的标签元素中不起作用。这是我的代码:
<div class="container-fluid">
<div class="tabbable js-report-tab-container">
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<div id="circle"></div> <div class="h_line"> **<!-- horizontal line should be here -->**</div> <span id="circle"></span>
<br/><br/>
<p>Choose one of these type of reports : </p>
<input type="checkbox" name="report" value="reportValue" checked > Summary <br/>
<input type="checkbox" name="report" value="reportValue" > Candidate Details <br/>
<input type="checkbox" name="report" value="reportValue" > . . . .
</div>
<div class="tab-pane" id="tab2">
This is the second step view...
</div>
<div class="tab-pane" id="tab3">
This is the third step view...
</div>
<div class="tab-pane" id="tab4">
This is the fourth step view...
</div>
</div> {{-- end of tab-content --}}
</div> {{-- end of tabbable --}}
</div>
<style type="text/css">
#circle {
width: 40px;
height: 40px;
background: blue;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
float: left;
}
.hline {
width:100%;
height:13px;
background: #ff0000;
clear:both;
display:inline;
}
hr{
display:inline;
margin-top: 0.5em;
border-width: 0.5px;
border-style: inset;
margin-bottom: 0.5em;
height:2px;
background: #00FF00;
width: 20%;
align:left;
</style>
我尝试使用 <hr align="left" /> 和 css 样式:
hr{
display:block;
margin-top: 2.5em;
border-width: 1px;
border-style: inset;
margin-bottom: 0.5em;
border-top:1px solid;
height:2px;
background: #00FF00;
width: 20%;
align:left;
}
我也尝试使用<div class="block_1">Lorem</div> <div class="h_line"></div>
CSS : .hline { width:30%; height:13px; background: #fff }
结果什么都没有:
我在这里错过了什么...??我的目标是在这两个圆圈之间创建一个水平线..
提前谢谢...这里需要帮助.. :)
【问题讨论】:
-
更改后显示所有代码?
-
我只是更改了
或 并应用了 css 样式,但没有任何更改......嗯......我没有t更改另一个代码先生。 @kollein -
设置 .h_line css: width:100%;clear:both;
-
width:100% 和 clearh:both 没有任何变化;先生。科林... :')
-
显示:块导致 hr 在自己的行上。尝试显示:内联。