html代码:左边栏右边栏主内容方法一:利用绝对定位方法(不推荐)css部分:body{margin:0;padding:0;height:100%;}#left,#right{position:absolute;top:0;width:220px;height:100%;background:pi...
分类:
其他好文 时间:
2015-06-24 14:31:38
阅读次数:
99
利用元素间的绝对定位差一像素,使用不同颜色做出浮出层小三角的效果,完美兼容各浏览器!html部分:◆◆◆◆◆◆◆◆ Hi,知道吗?我是打酱油的!css部分:/* poptip */.poptip{position: absolute;top: 20px;left:20px;padding: 6px ...
分类:
Web程序 时间:
2015-06-23 15:31:23
阅读次数:
154
html================css=================*{ margin: 0;padding: 0;}#box1{z-index: 1;position: absolute;width: 240px;height: 160px;left: 0px;top: 48px;ba...
分类:
其他好文 时间:
2015-06-21 20:59:24
阅读次数:
114
HTML5自由者 SVG画圆形进度条
#svgForStroke {
position: absolute;
top: 0;
left: 0;
width: 200px;
height: 200px;
stroke-d...
分类:
其他好文 时间:
2015-06-21 18:33:22
阅读次数:
279
from: zhangxinxu.com绝对定位元素的居中实现如果要问如何CSS实现绝对定位元素的居中效果,很多人心里已经有答案了。兼容性不错的主流用法是:.element { width: 600px; height: 400px; position: absolute; left: ...
分类:
其他好文 时间:
2015-06-21 15:46:53
阅读次数:
131
0% 0%#a{width: 300px;height: 40px;line-height: 40;position: relative;border: 1px solid black;}#b{background: blue;z-index: 2;position: absolute...
分类:
其他好文 时间:
2015-06-21 09:19:12
阅读次数:
86
html========== css===========#small{width: 200px;height: 200px;margin:110px auto;position: relative;}#pic{position: absolute;left: 0;top: 0;}js====...
分类:
其他好文 时间:
2015-06-20 16:56:29
阅读次数:
108
CSS在position位置信息要素用于表示属性。有三个起飞值:static, absolute, relative。假设元件不显式配置position财产,该元素默认position 值至static。1、static:这是表示该元素依照排列和嵌套的顺序和规则应该在的位置,此时设置top,righ...
分类:
Web程序 时间:
2015-06-19 20:12:55
阅读次数:
251
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
当给div设置absolute时,该元素已经脱离文档流,呈现浮动状态,只能通过left,top,right,bottom来设置属性,要实现居中只能通过js,代码如下:这里需要注意jquery中innerWidth(),outWidth(),innerHeight() ,outerHeight() 方...
分类:
其他好文 时间:
2015-06-17 23:07:08
阅读次数:
185