码迷,mamicode.com
首页 >  
搜索关键字:relative    ( 3126个结果
CSS position, z-index
position1、fixed:定位。浮动。(需要搭配left, right)2、absolute:相对于最近的父元素,不考虑周围的布局。(可使用z-index占据位置,则同一位置层叠)3、relative:对象不可层叠,相对于自己。(relative加上top,例如top: -50px,意思是上移...
分类:Web程序   时间:2015-03-14 16:50:20    阅读次数:153
[转]relative、absolute和float
position:relative和position:absolute都可以改变元素在文档中的位置,都能激活元素的left、top、right、bottom和z-index属性。(默认这些属性未激活,设置了也无效) 设置position:relative和position:absolute都会让元....
分类:其他好文   时间:2015-03-13 12:29:12    阅读次数:128
CSS定位
positionposition:static| relative | absolute | fixed |center|page|sticky默认值:staticstatic:对象遵循常规流。top,right,bottom,left等属性不会被应用。relative:对象遵循常规流,并且参照自身...
分类:Web程序   时间:2015-03-13 10:35:26    阅读次数:148
使用Jquery实现图片轮播效果
JQuery实现图片轮播 *{margin: 0;padding: 0;} #box{width:600px;height:240px;position: relative;} #pic{width:600px;height:240px;position: relative;top:0px;left:0px;} img{position: absolute;}/* 将三个图片层叠在一起 */ #...
分类:Web程序   时间:2015-03-11 12:59:39    阅读次数:125
Qquery 队列动画 queue() dequeue() clearqueue()
.box{border:1px solid red;width:600px;height: 300px;margin:30px auto;position: relative;}         .box div{position: absolute;top:0;width:10px;height:10px;background:blueviolet;}         .l1{left:20...
分类:其他好文   时间:2015-03-10 10:33:23    阅读次数:114
如何将页脚固定在页面底部
方法一:HTML:页头区域页面内容页脚CSS:html,body{margin:0;padding:0;height:100%;}#container{min-height:100%;height:auto !important;height:100%;position:relative;}#hea...
分类:其他好文   时间:2015-03-09 14:06:19    阅读次数:147
如何实现图片全屏(当图片大小不够大时)
方法一: 背景图片全屏要点: 1.设置包裹div 高和宽为:100% {width:100%; height:100%;} 2.设置包裹div 的 position为relative (position:relative;) 3.设置背景图片高和宽为:100% ...
分类:其他好文   时间:2015-03-09 12:48:35    阅读次数:137
一个支持IE的html滑动条
<html> <script?type="text/javascript"?src="jquery.js"></script> <style> .d_b{ height:?20px; width:?10px; display:?inline-block; background-color:?black; position:?relative; vertical-a...
分类:Web程序   时间:2015-03-06 20:50:45    阅读次数:274
IE7绝对定位层级显示问题
问题: 当父级元素为相对定位position:relative;,子元素为绝对定位position:absolute;并且层级较高时,一般浏览器显示为子元素在父元素之上,但IE7子元素却被父级兄弟元素遮盖在下面,解决: 1.可设置当前父级元素层级高于父级兄弟元素, 2.若子元素有下拉时,可设当...
分类:其他好文   时间:2015-03-03 14:52:24    阅读次数:148
css未知宽度水平居中整理
1、text-align兼容性很好.wp {text-align: center;}.test {display: inline;} 1 2 3 4 52、float+relative兼容性很好.wp {position:relative; left:50%; floa...
分类:Web程序   时间:2015-03-03 13:17:27    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!