Bootstrap modal垂直居中 在网上看到有Bootstrap2的Modal dialog垂直居中问题解决方法,这种方法自己试了一下,并不能完全居中,并且窗口的大小不一样的话,每次显示的margin-top值也会改变,遮盖层还会出现滚动条,效果也不好看,代码如下:Js代码 //在初始显示时设...
分类:
其他好文 时间:
2015-06-24 20:44:06
阅读次数:
122
1.如何让一个绝对定位的div居中:如 div{position:absolute width:300px; height:400px; } 1. left:0;right:0;height:0;top:0;//IE8下不兼容 2. margin-left: -150px;margin-top: ....
分类:
Web程序 时间:
2015-06-19 10:21:38
阅读次数:
140
为什么子footer_top的margin-top属性错误呢?为什么子footer_top的margin-top属性引起父级footer margin-top属性变化呢? t b
分类:
其他好文 时间:
2015-06-18 21:53:55
阅读次数:
134
测试 其实解决的思路是这样的:首们需要position:absolute;绝对定位。而层的定位点,使用外补丁margin负值的方法。负值的大小为层自身宽度高度除以二。如:一个层宽度是400,高度是300。使用绝对定位距离上部与左部都设置成50%。而margin-top的值为-150。margin-l...
分类:
其他好文 时间:
2015-06-16 14:28:47
阅读次数:
79
修改颜色,线条形状,粗细等...CSS代码:.zh_hr{ border:3px solid rgba(255, 255, 255, 0.50); margin-bottom: 2px; margin-top: 2px}HTML代码:
分类:
Web程序 时间:
2015-06-16 12:44:17
阅读次数:
179
JS Bin .div1{ border:solid 1px red; width:100%; height:400px; position:relative; margin-top:80px;}.div2{ border:solid 1px...
分类:
Web程序 时间:
2015-06-12 18:45:22
阅读次数:
92
常出现两种情况:(一)margin-top失效先看下面代码:float:leftclear:both; margin-top:20px;两个层box1和box2,box1具有浮动属性,box2没有,这时候设置box2的上边距 margin-top没有效果。网上能找到的两种比较靠谱的解释:1:“在CS...
分类:
其他好文 时间:
2015-06-11 22:52:33
阅读次数:
160
body{
margin-top:50px;
}
.s-body
{
width:400px;
margin-left:auto;margin-right:auto;
}
.s-input
{
border:1...
分类:
Web程序 时间:
2015-06-11 19:33:54
阅读次数:
148
一、两个div并列,上面div的margin-bottom和下面div的margin-top会塌陷,也就说会取上面div的margin-bottom和下面div的margin-top的最大值作为显示值。解决方法:两个div并列,只设置其中一个块上或下margin的一处即可。二、父块DIV内含子块DI...
分类:
Web程序 时间:
2015-06-04 15:24:27
阅读次数:
123
1.div保持底部浮动(不受滚动条影响)position:fixed;_position:absolute;bottom:0px;_bottom:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.sc...
分类:
Web程序 时间:
2015-06-03 13:26:02
阅读次数:
105