<小时>Twitter Bootstrap 中的标签无法正常工作? [英] <hr> tag in Twitter Bootstrap not functioning correctly?

查看:24
本文介绍了<小时>Twitter Bootstrap 中的标签无法正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码:

<div><h1>欢迎 TeamName1</h1>自卫队<小时>自卫队

<!--/容器-->

hr 标签似乎不像我期望的那样工作.它不是画一条线,而是创建一个间隙,如下所示:

<块引用>

解决方案


的css属性是:

hr {-moz-border-bottom-colors:无;-moz-border-image:无;-moz-border-left-colors:无;-moz-border-right-colors:无;-moz-border-top-colors:无;边框颜色:#EEEEEE -moz-use-text-color #FFFFFF;边框样式:实心无;边框宽度:1px 0;边距:18px 0;}

它对应一条 1px 的水平线,带有非常浅的灰色和 18px 的垂直边距.

并且因为


在没有 class 的

中,所以宽度取决于

的内容>

如果您希望


为全宽,请将

替换为

<div class='span12'>(带有相应的结束标签).

如果您期望有所不同,请通过添加评论来描述您的期望.

Here is my code:

<div class="container">
<div>
<h1>Welcome TeamName1</h1>
  asdf
  <hr>
  asdf

</div>
</div> <!-- /container -->

The hr tag does not seem to work as I would expect it. Instead of drawing a line, it creates a gap, like so:

解决方案

the css property of <hr> are :

hr {
  -moz-border-bottom-colors: none;
  -moz-border-image: none;
  -moz-border-left-colors: none;
  -moz-border-right-colors: none;
  -moz-border-top-colors: none;
  border-color: #EEEEEE -moz-use-text-color #FFFFFF;
  border-style: solid none;
  border-width: 1px 0;
  margin: 18px 0;
}

It correspond to a 1px horizontal line with a very light grey and vertical margin of 18px.

and because <hr> is inside a <div> without class the width depends on the content of the <div>

if you would like the <hr> to be full width, replace <div> with <div class='row'><div class='span12'> (with according closing tags).

If you expect something different, describe what you expect by adding a comment.

这篇关于&lt;小时&gt;Twitter Bootstrap 中的标签无法正常工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆