草庐IT

collapsing-margins

全部标签

javascript - Bootstrap 3 Collapse - 添加事件类以打开面板

首先是fiddle:http://jsfiddle.net/krish7878/h38jn324/单击面板时的简单问题(它会展开以显示其各自的内容),需要将类“事件”添加到“面板标题”。我发现了类似的问题,但这些解决方案似乎都不起作用(奇怪的是)。任何帮助,将不胜感激。HTML代码:OurMissionAtveroeosetaccusamusetiustoodiodignissimosducimusquiblanditiispraesentiumvoluptatumdelenitiatquecorruptiquosdoloresetquasmolestiasexcepturisinto

javascript - Bootstrap 3 Collapse - 添加事件类以打开面板

首先是fiddle:http://jsfiddle.net/krish7878/h38jn324/单击面板时的简单问题(它会展开以显示其各自的内容),需要将类“事件”添加到“面板标题”。我发现了类似的问题,但这些解决方案似乎都不起作用(奇怪的是)。任何帮助,将不胜感激。HTML代码:OurMissionAtveroeosetaccusamusetiustoodiodignissimosducimusquiblanditiispraesentiumvoluptatumdelenitiatquecorruptiquosdoloresetquasmolestiasexcepturisinto

html - 为什么 "position: absolute; left: 0; right: 0; width: XYpx; margin: 0 auto"实际上居中?

我在CSS方面非常精通,但今天我偶然发现了一个让我头疼的片段(here和here)。我从没想过可以通过margin:0auto将绝对定位的元素居中,但考虑到所讨论的元素具有设置的宽度并且有left:0和对:0,它实际上似乎有效:#parent{background:#999;height:300px;position:relative;width:300px;}#child{background:#333;height:50px;left:0;margin:0auto;position:absolute;right:0;width:50px;}(JSFiddle)我一直认为left:0

html - 为什么 "position: absolute; left: 0; right: 0; width: XYpx; margin: 0 auto"实际上居中?

我在CSS方面非常精通,但今天我偶然发现了一个让我头疼的片段(here和here)。我从没想过可以通过margin:0auto将绝对定位的元素居中,但考虑到所讨论的元素具有设置的宽度并且有left:0和对:0,它实际上似乎有效:#parent{background:#999;height:300px;position:relative;width:300px;}#child{background:#333;height:50px;left:0;margin:0auto;position:absolute;right:0;width:50px;}(JSFiddle)我一直认为left:0

html - 为什么 margin :auto doesn't work?

这个问题在这里已经有了答案:CenterandDisplayonSameLine(3个答案)关闭8年前。我想让我的元素居中但是当我使用margin-left:auto;margin-right:auto;这是行不通的!这是我的htmlHiHiagian!这是我的CSS:#t{margin-left:auto;margin-right:auto;margin-top:10px;}.tc{margin-left:auto;margin-right:auto;width:600px;display:inline;border-style:solid;border-width:1px;}你可以

html - 为什么 margin :auto doesn't work?

这个问题在这里已经有了答案:CenterandDisplayonSameLine(3个答案)关闭8年前。我想让我的元素居中但是当我使用margin-left:auto;margin-right:auto;这是行不通的!这是我的htmlHiHiagian!这是我的CSS:#t{margin-left:auto;margin-right:auto;margin-top:10px;}.tc{margin-left:auto;margin-right:auto;width:600px;display:inline;border-style:solid;border-width:1px;}你可以

html - margin 自动失败 IE11

如果你checkmywebsite使用浏览器Chrome,您可以看到名为.bg-content的div如何与这种样式一起工作:.bg-content{max-width:605px;height:149px;position:absolute;top:62px;font-family:sans-serif;margin-left:auto;margin-right:auto;left:0;right:0;}但是如果你用InternetExplorer11打开我的网站,div.bg-content不会居中,他会向左浮动。我该如何解决这个问题? 最佳答案

html - margin 自动失败 IE11

如果你checkmywebsite使用浏览器Chrome,您可以看到名为.bg-content的div如何与这种样式一起工作:.bg-content{max-width:605px;height:149px;position:absolute;top:62px;font-family:sans-serif;margin-left:auto;margin-right:auto;left:0;right:0;}但是如果你用InternetExplorer11打开我的网站,div.bg-content不会居中,他会向左浮动。我该如何解决这个问题? 最佳答案

html - css: margin-top 导致滚动条

h1元素导致滚动条出现。谁能解释一下为什么?html,body{margin:0;padding:0;height:100%;}header{height:10%;}section{height:90%;}Hellotest 最佳答案 那是因为h1默认有一些垂直边距,通常是0.67em。h1的上边距折叠height从不包括边距区域的高度由于h1的上边距折叠,它的行为就像是属于header而不是h1的边距。由于h1的内容高度为10%,因此其总高度将为calc(10%+0.67em)。这就是溢出的原因。如果您移除顶部边距但保留底部边距,

html - css: margin-top 导致滚动条

h1元素导致滚动条出现。谁能解释一下为什么?html,body{margin:0;padding:0;height:100%;}header{height:10%;}section{height:90%;}Hellotest 最佳答案 那是因为h1默认有一些垂直边距,通常是0.67em。h1的上边距折叠height从不包括边距区域的高度由于h1的上边距折叠,它的行为就像是属于header而不是h1的边距。由于h1的内容高度为10%,因此其总高度将为calc(10%+0.67em)。这就是溢出的原因。如果您移除顶部边距但保留底部边距,