css属性left、right、top、bottom
来源:互联网 发布:信捷plc的编程方法 编辑:程序博客网 时间:2024/06/05 20:16
css中:left、right、top、bottom属性
浏览器支持
所有主流浏览器都支持 这几个 属性。
定义和用法
left 属性规定元素的左边缘。该属性定义了定位元素左外边距边界与其包含块左边界之间的偏移。
right 属性规定元素的右边缘。该属性定义了定位元素右外边距边界与其包含块右边界之间的偏移。
top 属性规定元素的顶部边缘。该属性定义了一个定位元素的上外边距边界与其包含块上边界之间的偏移。
bottom 属性规定元素的底部边缘。该属性定义了定位元素下外边距边界与其包含块下边界之间的偏移。
注释:如果 "position" 属性的值为 "static",那么设置 left、right、top、bottom属性不会产生任何效果。
javascript语法:object.style.left="100px"
css中:position属性
relative:位置被设置为 relative 的元素,可将其移至相对于其正常位置的地方,因此 "left:20" 会将元素移至元素正常位置左边 20 个像素的位置。
absolute:位置设置为 absolute 的元素,可定位于相对于包含它的元素的指定坐标。此元素的位置可通过 "left"、"top"、"right" 以及 "bottom" 属性来规定。
fixed:位置被设置为 fixed 的元素,可定位于相对于浏览器窗口的指定坐标。此元素的位置可通过 "left"、"top"、"right" 以及"bottom" 属性来规定。不论窗口滚动与否,元素都会留在那个位置。工作于 IE7(strict 模式)。
0 0
- css属性left、right、top、bottom
- CSS中边偏移属性top,right,bottom,left
- css中的clip属性rect(top,right,bottom,left);
- DIV CSS left right top bottom定位
- DIV CSS left right top bottom定位
- css left right top bottom定位
- css之top,right,bottom,left
- css中absolute定位的top bottom left right
- css中的relative相对定位的top bottom left right
- margin: left right /top bottom的怪异
- 定位参数:position、left、right、top、bottom
- clip:rect('top', 'right', 'bottom', 'left')
- left right top bottom定位div无效
- View的位置--top, left, bottom, right
- glOrtho(left, right, bottom, top, near, far)
- html中 left,right,top,bottom图示
- setBounds(left, top, right, bottom)详解
- absolute同时设置left,right,top,bottom
- ConcurrentHashMap的putIfAbsent可能存在的问题
- 文件目录常用操作的类
- 环境变量
- jQuery歌词播放器
- 封装
- css属性left、right、top、bottom
- Mysql报错java.sql.SQLException:null,message from server:"Host '27,45,38,132' is not allowed to connect
- Unity三屏全屏方法
- 构成回文序列至少要删掉多少字符
- html 块元素和内敛元素的区别
- 国中国:自己建立一个简单好用的mvc机制(一)
- 自定义控件时Use View.isInEditMode() in your custom views to skip code when shown in Eclipse问题
- LeetCodeOJ——3. Longest Substring Without Repeating Characters
- 根据前台设计数据库--产品展示篇2