对于想了解锚标签–相同的高度,仍然可以用CSS点击?的读者,本文将提供新的信息,我们将详细介绍锚点a标签,并且为您提供关于css–2列相同的高度–Twitter的Bootstrap2.0、css–bo
对于想了解锚标签 – 相同的高度,仍然可以用CSS点击?的读者,本文将提供新的信息,我们将详细介绍锚点a标签,并且为您提供关于css – 2列相同的高度 – Twitter的Bootstrap 2.0、css – body:overflow-x – 仍然可以使用触控板滚动、css – Bootstrap 3响应图像并排相同的高度、css – Twitter Bootstrap – 与流体柱相同的高度的有价值信息。
本文目录一览:- 锚标签 – 相同的高度,仍然可以用CSS点击?(锚点a标签)
- css – 2列相同的高度 – Twitter的Bootstrap 2.0
- css – body:overflow-x – 仍然可以使用触控板滚动
- css – Bootstrap 3响应图像并排相同的高度
- css – Twitter Bootstrap – 与流体柱相同的高度
锚标签 – 相同的高度,仍然可以用CSS点击?(锚点a标签)
http://jsfiddle.net/tYrCe/1/
如果你愿意,可以编辑它!
我有3个带锚标签的按钮.我希望他们的身高相等.
要求
>高度相等
>独立于内容(最小高度,不好)
>整个链接仍然可以点击(javascript onclick,not ok)
解决方法
table-layout:fixed均匀分布单元格之间的可用宽度.
确保您可以接受浏览器支持:http://caniuse.com/css-table
(我假设没有IE6 / 7支持是好的,因为你正在使用大纲)
见:http://jsfiddle.net/thirtydot/Ab6bg/
.urls { width: 300px; background: #fff; display: table; table-layout: fixed } .urls a { display: table-cell; outline: 1px solid #ccc }
css – 2列相同的高度 – Twitter的Bootstrap 2.0
事情是:我正在使用一个固定的940px宽,12列网格中心的布局与两列,我希望两个列具有相同的高度。现在的代码是这样的:
<div> <div> <div> <div> <div> <div id="notWrap"> <div id="not"> </div> </div> </div> </div> <div> <div> <div id="myPWrap"> <div id="myP"> </div> </div> <hr /> <div id="otherPWrap"> <div id="otherP"> </div> </div> </div> </div> </div> </div> <footer id="bottom"> <p>©</p> </footer> </div>
如你所见,有没有内容的div,如“myP”,“otherP”和“not”。它们通过Javascript填充,并且存储在其中的内容的数量可能会有所不同,因此,在许多时候,列(这里的“列”由div表示,“div-content”类和div与“div-sidebar”类)将大于另一个(在特定情况下,两列可能是“较大的”)。
这是一张照片,如果它有帮助:
基本上,代码中的左列(< div class =“span8 div-content”>)需要与右列的大小相同(< div class =“span4 div-sidebar”> in代码),反之亦然。另外,如果有帮助,黄色部分是< div class =“content”>白色背景是< div class =“container”>。 < div class =“row”>只是两列的容器,没有颜色。
我知道“高度相同”的问题是网络程序员的一个常见问题,但是我迄今为止所尝试的解决方案没有奏效。我真的不喜欢“Faux Column解决方案”,因为我是CSS中的新手,所以我不想像这样一个解决方案。如果可能,我宁愿坚持纯CSS。
提前,感谢那些愿意帮助的人。
解决方法
#myPWrap,#otherPWrap { overflow:hidden; } #myP,#otherP { margin-bottom: -99999px; padding-bottom: 99999px; }
您还可以尝试将包装转换成表,将#myP转换为表格列。
#myPWrap,#otherPWrap { display: table; } #myP,#otherP { display: table-cell; }
css – body:overflow-x – 仍然可以使用触控板滚动
有没有办法绕过这个?
<div id="container"> <div id="big-image"></div> </div><!-- #container --> #container { overflow-x: hidden; } #big-image { background: transparent url('/path/to/image.png') no-repeat center top; position: absolute; width: 1307px; left: 50%; margin: 0 0 0 -653.5px; z-index: 4; }
解决方法
例
body { overflow-x: hidden; } #container { overflow: hidden; width: 100%; }
css – Bootstrap 3响应图像并排相同的高度
<div> <div> <div> <imgsrc="http://placehold.it/400x400" /> </div> <div> <imgsrc="http://placehold.it/800x400" /> </div> </div> </div>
演示小提琴:http://jsfiddle.net/u9av6/3/
谢谢!
解决方法
<div><img src="http://placehold.it/400x400" height="220" /></div> <div><img src="http://placehold.it/800x400" height="220" /></div>
css – Twitter Bootstrap – 与流体柱相同的高度
解决方法
.col{ margin-bottom: -99999px; padding-bottom: 99999px; background-color:#ffc; } .col-wrap{ overflow: hidden; }
你可以看到它在jsFiddle工作
编辑
如果您想要相等的高度井或圆角的列,则会有变化:
http://jsfiddle.net/panchroma/4Pyhj/
编辑
另一个变体具有相同高度的孔或具有圆角的列,此时为Bootstrap 3
http://jsfiddle.net/panchroma/D4xdE/
它或多或少与Bootstap 2相同,但是通过一些改进来适应BS如何空间排列列网格的变化。
关于锚标签 – 相同的高度,仍然可以用CSS点击?和锚点a标签的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于css – 2列相同的高度 – Twitter的Bootstrap 2.0、css – body:overflow-x – 仍然可以使用触控板滚动、css – Bootstrap 3响应图像并排相同的高度、css – Twitter Bootstrap – 与流体柱相同的高度等相关内容,可以在本站寻找。
本文标签: