jjzjj

margin-bottom

全部标签

jquery - 创建一个 jquery Margin 加法器类

我正在寻找一种使用jquery为任意数字添加边距的方法。它应该是这样的:Addthistextmargin-right=5pxAddthistextmargin-left=15pxAddthistextmargin-top=6pxAddthistextmargin-bottom=4px等等...Addthistextmargin=4pxAddthistextpadding=4px...是否可以创建jquery代码来执行此操作?也许这样做是为了填充。想法:它也可以在Bootstrap中使用,比如添加自动填充、边距甚至font-size和fs18来添加font-尺寸:18px谢谢

html - margin :auto and justify-content/align-items center?有什么区别

要同时水平和垂直居中,有两个简单的选项:首先.outer{display:flex;}.inner{margin:auto;}第二.outer{display:flex;justify-content:center;align-items:center;}有什么区别?在什么情况下我们会使用一个而不是另一个? 最佳答案 在你的第一个例子中.......outer{display:flex;}.inner{margin:auto;}...auto边距仅适用于flex元素,并使容器内的一个flex元素居中。在你的第二个例子中.......

html - margin :auto and justify-content/align-items center?有什么区别

要同时水平和垂直居中,有两个简单的选项:首先.outer{display:flex;}.inner{margin:auto;}第二.outer{display:flex;justify-content:center;align-items:center;}有什么区别?在什么情况下我们会使用一个而不是另一个? 最佳答案 在你的第一个例子中.......outer{display:flex;}.inner{margin:auto;}...auto边距仅适用于flex元素,并使容器内的一个flex元素居中。在你的第二个例子中.......

html - FireFox 中的 margin 问题

我在Firefox中有一个边距问题,它在其他浏览器中完全有效,所以,这是我的HTMLHTML://***表示一些代码//***//***//***CSS:.clear{clear:both;}.left{float:left}.right{float:right}.search-seaction{margin-top:62px;}这里是截图火狐:Opera和Chrome:页眉上的边距仅出现在Firefox中。这种行为的原因是什么?问题:当我给部分留边距时,标题是“边距” 最佳答案 尝试给标题一个高度:header{height:10

html - FireFox 中的 margin 问题

我在Firefox中有一个边距问题,它在其他浏览器中完全有效,所以,这是我的HTMLHTML://***表示一些代码//***//***//***CSS:.clear{clear:both;}.left{float:left}.right{float:right}.search-seaction{margin-top:62px;}这里是截图火狐:Opera和Chrome:页眉上的边距仅出现在Firefox中。这种行为的原因是什么?问题:当我给部分留边距时,标题是“边距” 最佳答案 尝试给标题一个高度:header{height:10

javascript - 使用 jQuery 更改 margin 值

如果有错误消息,我有以下代码。那么登录表单的边距顶部应该是“0”,对于第一个错误消息,边距顶部应该是“70px”。Youhaveenteredinvaliddata.Pleasetryagain.Authenticationfailed.Pleasetryagain.FormDisplayhere 最佳答案 $('.login-form').css({'margin-top':'0px'});//Loginform$('.portlet-msg-error:first').css({'margin-top':'70px'});//E

javascript - 使用 jQuery 更改 margin 值

如果有错误消息,我有以下代码。那么登录表单的边距顶部应该是“0”,对于第一个错误消息,边距顶部应该是“70px”。Youhaveenteredinvaliddata.Pleasetryagain.Authenticationfailed.Pleasetryagain.FormDisplayhere 最佳答案 $('.login-form').css({'margin-top':'0px'});//Loginform$('.portlet-msg-error:first').css({'margin-top':'70px'});//E

html - 16 :9 padding-bottom trick not working as expected in FireFox

我一直在尝试为内容block实现响应式16:9比例技巧,虽然在Chrome中获得了预期的结果,但其他浏览器(如FireFox和Edge)的显示方式完全不同,并非预期。.streamContainer{position:absolute;width:80%;height:calc(100%-120px);display:flex;bottom:0px;flex-direction:column;justify-content:center;box-sizing:border-box;transition:height0.5s;background:blue;}.streamRatio{p

html - 16 :9 padding-bottom trick not working as expected in FireFox

我一直在尝试为内容block实现响应式16:9比例技巧,虽然在Chrome中获得了预期的结果,但其他浏览器(如FireFox和Edge)的显示方式完全不同,并非预期。.streamContainer{position:absolute;width:80%;height:calc(100%-120px);display:flex;bottom:0px;flex-direction:column;justify-content:center;box-sizing:border-box;transition:height0.5s;background:blue;}.streamRatio{p

html - 为什么 1px 的边框会抵消 100px 的 margin-top 并杀死滚动条?

这对我来说还没有意义。我错过了什么?代码如下,onCodepen.*{box-sizing:border-box;margin:0;padding:0;}body{height:100vh;background:pink;}.middle{position:relative;top:200px;/*uncommentthebordertokillthescrollbar!*//*border:1pxsolidgreen;*/}.middlediv{margin-top:100px;border:1pxdashedyellow;}Textbox-sizing:border-box;没有任