草庐IT

webkit-margin-before

全部标签

css - 左边距 : auto and margin-right: auto not working on input

我有一个表单输入,我试图将其居中对齐。通常margin-left:auto和margin-right:auto在display:block未添加到CSS时无法响应。我已将display:block添加到我的CSS,但它仍然没有按我希望的方式显示。我制作了一个JSFiddle以便于理解:http://jsfiddle.net/XnKDQ/97/ 最佳答案 为了margin:0auto;上类,除了display:block一个width需要指定。 关于css-左边距:autoandmargi

html - Bootstrap : add margin/padding space between columns

我试图在我的Bootstrap网格布局的列之间放置一些额外的边距/填充空间。我试过了this但我不喜欢这个结果。这是我的代码:Widget1Widget2我想添加margin:10px和padding:10px。有些人建议将他们的类更改为col-md-5withpull-left和pull-right,但它们之间的差距将是太大了。 最佳答案 只需在col-md-6中添加一个具有您需要的额外填充的div。col-md-6是保持列完整性的“Backbone”,但您可以在其中添加额外的填充。Widget1Widget2CSS.classW

html - Bootstrap : add margin/padding space between columns

我试图在我的Bootstrap网格布局的列之间放置一些额外的边距/填充空间。我试过了this但我不喜欢这个结果。这是我的代码:Widget1Widget2我想添加margin:10px和padding:10px。有些人建议将他们的类更改为col-md-5withpull-left和pull-right,但它们之间的差距将是太大了。 最佳答案 只需在col-md-6中添加一个具有您需要的额外填充的div。col-md-6是保持列完整性的“Backbone”,但您可以在其中添加额外的填充。Widget1Widget2CSS.classW

html - 通过 CSS 的 Unicode :before

我正在使用FontAwesome在我的网页上,我想在:before伪元素中显示一个图标。根据documentation/cheatsheet,我必须键入才能获得此字体,但它不起作用。我认为这是正常的,因为:before不支持HTML实体。所以我搜索了一下,发现如果你想在:before中显示HTML实体,你必须使用转义的十六进制引用。所以我正在搜索对的十六进制引用,但我一无所获。我认为那是因为这些是“私有(private)使用”值,无论这意味着什么。有什么办法让它在:before中工作吗? 最佳答案 在CSS中,FontAweso

html - 通过 CSS 的 Unicode :before

我正在使用FontAwesome在我的网页上,我想在:before伪元素中显示一个图标。根据documentation/cheatsheet,我必须键入才能获得此字体,但它不起作用。我认为这是正常的,因为:before不支持HTML实体。所以我搜索了一下,发现如果你想在:before中显示HTML实体,你必须使用转义的十六进制引用。所以我正在搜索对的十六进制引用,但我一无所获。我认为那是因为这些是“私有(private)使用”值,无论这意味着什么。有什么办法让它在:before中工作吗? 最佳答案 在CSS中,FontAweso

html - CSS 绝对位置不适用于 margin-left :auto margin-right: auto

假设您将以下CSS应用于div标签.divtagABS{position:absolute;margin-left:auto;margin-right:auto;}margin-left和margin-right不生效但如果你有亲戚,它工作正常即.divtagREL{position:relative;margin-left:auto;margin-right:auto;}这是为什么呢?我只想让一个元素居中。有人可以解释为什么在绝对位置将边距设置为auto不起作用吗? 最佳答案 编辑:这个答案曾经声称不可能使用margin:auto

html - CSS 绝对位置不适用于 margin-left :auto margin-right: auto

假设您将以下CSS应用于div标签.divtagABS{position:absolute;margin-left:auto;margin-right:auto;}margin-left和margin-right不生效但如果你有亲戚,它工作正常即.divtagREL{position:relative;margin-left:auto;margin-right:auto;}这是为什么呢?我只想让一个元素居中。有人可以解释为什么在绝对位置将边距设置为auto不起作用吗? 最佳答案 编辑:这个答案曾经声称不可能使用margin:auto

html - 使 TBODY 在 Webkit 浏览器中可滚动

我知道thisquestion,但所有答案都不适用于Safari、Chrome等。公认的策略(asdemonstratedhere)是像这样设置tbody高度和溢出属性:Thisistheheaderanddoesn'tscrollcontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrolls不幸的是,这在任何webkit浏览器中都不起作用。有一个bugreport关于它似乎不是一个高优先级(6月5

html - 使 TBODY 在 Webkit 浏览器中可滚动

我知道thisquestion,但所有答案都不适用于Safari、Chrome等。公认的策略(asdemonstratedhere)是像这样设置tbody高度和溢出属性:Thisistheheaderanddoesn'tscrollcontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrollscontentthatscrolls不幸的是,这在任何webkit浏览器中都不起作用。有一个bugreport关于它似乎不是一个高优先级(6月5

html - 显示 :inline-block margin 0 auto not center 的 div

我尝试使用上面的代码来设置等于它的内容的宽度,然后用margin:0auto;将它居中;但它在任何浏览器上都不适合我。有什么建议吗?顺便说一句,当我设置宽度属性时,它工作正常。 最佳答案 显示:表格;也会把它放在中心:CSS:.button{display:table;margin:0auto;}HTML:注意:使用内联样式是一种不好的做法。 关于html-显示:inline-blockmargin0autonotcenter的div,我们在StackOverflow上找到一个类似的问题