草庐IT

margin-bottom

全部标签

html - 绝对位置和 margin : auto

我有一个小问题,我希望我的页脚以position:absolute保留在屏幕底部。但是我将它放在屏幕中间的margin:auto不再起作用了。HTML:TESTDenAllerstrafste"Ful-Ambi"Live-BandvangrootAntwerpenenomstreken!HomeWieiswieFoto'sRepertoireLinksContactTESTDevelopedbyYoshi©vAntstAdCSS:/*PAGELAYOUT*/html{padding:0px;margin:0px;}body{background-image:url(../IMA

html - CSS中border-bottom的 flex 端

我想让我的边框底部看起来像这样:有一个flex的末端。目前它看起来像这样:我尝试使用的CSS是border-bottom-right-radius:10px;。代码如下所示:loremipsum.title{border-bottom:10pxsolid$mainRed;border-bottom-right-radius:10px;}我还尝试了border-radius:10px;这给了我相同的结果,只是两端都是flex的。增加这个数字只会使直线向上倾斜。如何使线条看起来正确? 最佳答案 这在默认边框内是不可能的,因为border

html - 使用 space-between 和 margins 左对齐 flexbox 的最后一行

这个问题在这里已经有了答案:Targetingflexitemsonthelastorspecificrow(10个答案)关闭5年前。我在一个容器中有未知数量的元素,需要在外部没有边距的情况下进行包装,但它们之间的边距最小。我还需要用space-between和最后一行左对齐来证明这些。我正在尝试像这样使用flexbox来做到这一点:.outside{border:1pxsolidblack;}.container{margin:-5px;display:flex;flex-wrap:wrap;justify-content:space-between;}.container:afte

html - 当 margin 和 padding 为零时,为什么这些 p 元素之间有空格?

这是一个fiddle.简化后的HTML基本上就是这样使用这个CSS#canvasp{margin:0;border:0;padding:0;}#canvaspspan{width:50px;height:50px;cursor:pointer;border:thinsolidblack;display:inline-block;}它呈现如下:为什么行与行之间有空格?DOMInspector告诉我span的边距和填充以及p标签为零。 最佳答案 将vertical-align:top添加到span中。默认为baselineFiddle#

html - 如何将 margin-bottom 重置为其默认值

我希望能够将元素的margin-bottom设置为其默认值。考虑以下示例,其中有h1元素,它们各自的margin-bottom样式属性设置为0:h1{border:1pxsolidred;margin-bottom:0;}p{margin:0;}FirstHeadingParagraphSecondHeadingParagraph如何将#normal-margin的margin-bottom值重置为其初始默认值?显然使用initial是行不通的,astheinitialvalueofmargin-bottomis0.我意识到在这个简单的例子中,我可以简单地将:not(#normal-m

html - IE7 HTML/CSS margin-bottom 错误

场景如下:我有一个margin-bottom为19px的表格。在它下面我有一个包含一些字段集的表单。其中一个向右浮动。问题是margin-bottom在IE7中没有得到完整的19px。我已经检查了所有我能想到的IE7css/margin/float错误,并尝试了补救措施但没有成功。我已经用谷歌搜索了一段时间,但找不到任何有帮助的东西。这是我试过的。将表单或字段集包装在无样式的div中。无明显变化。取消表格上的margin-bottom,而是用div包裹它并给它一个19px的padding-bottom。无明显变化。取消表格的底部边距并添加一个固定高度为19像素的div。无明显变化。在表

html - Zurb Foundation 6 视口(viewport)高度结束时的粘性开关状态 ".is-anchored .is-at-bottom"

尝试创建一个始终固定在网站顶部的菜单。遵循zurb.foundation的文档,但.sticky的行为总是出乎意料。或者也许我没有得到一些明显的信息?请在此处检查重建:http://codepen.io/mister-hansen/pen/wMgrPm如果网站向下滚动,并恰好达到初始视口(viewport)的高度,粘性插件会将元素.sticky从is-stuckis-at-top更改为:.is-anchored.is-at-bottom所以.sticky消失了。谢谢。更新文档的第一部分:foundation.zurb.com/sites/docs/sticky.html解释了所描述的行

html - 设置中心位置的 margin-left 和 margin-right

我想将中心设置为.user-menu位置,但我下面的代码不起作用。我该如何解决这个问题?HTMLتاریخچهخریدحسابکاربریCSS*{margin:0px;padding:0px;font-family:Tahoma;}.centered{margin-left:auto;margin-right:auto;}.menu-items{float:left;height:90px;margin-left:10px;margin-right:10px;}.profile{width:72px;height:72px;padding-left:10px;padding-righ

html - 为什么 margin-top 与 inline-block 一起工作而不与 inline 一起工作?

在下面的代码中,我试图让h1元素有一个上边距。当我在css中将位置设置为内联时,margin-top没有显示。但是当我将它更改为内联block时,它确实如此。我想知道是否有人可以解释为什么会这样。谢谢。编辑:这是jsfiddle中的代码:http://jsfiddle.net/pjPdE/这是我的HTML:MaxPleaner'sFirstWebsiteWelcometomysite.这是CSSbody{background-image:url('sharks.jpg');}h1{background-color:#1C0245;display:inline;padding:6.5px

html5 : three-rows flexbox with fixed top/bottom and scrollable middle

是否可以制作一个具有固定header/footer和可滚动article部分的html5flexbox布局,如下所示firefox24和chromium31?+----------+|header|+----------+|article|||||||||||+----------+|footer|+----------+我试过这个(简化版):body{display:flex;flex-direction:column;}header{flex:1;}article{flex:8;overflow-y:scroll;}footer{flex:1;}现在我试图用article填充剩余空