css定位
来源:互联网 发布:聊天软件市场分析 编辑:程序博客网 时间:2024/06/05 01:12
定位 position 它的值为:
absolute 生成绝对定位的元素,相对于 static 定位以外的第一个父元素进行定位。 通过 "left", "top", "right" 以及 "bottom" 属性进行规定。
fixed 生成绝对定位的元素,相对于浏览器窗口进行定位。通过 "left", "top", "right" 以及 "bottom" 属性进行规定。
relative 生成相对定位的元素,相对于其正常位置进行定位。
static 默认值。没有定位,元素出现在正常的流中(忽略 top, bottom, left, right 或者 z-index 声明)。
inherit 规定应该从父元素继承 position 属性的值。
下面看几个例子
position:relative;
left:20px
position:absolute;
left:100px;
top:150px
position:fixed;
left:5px;
top:5px;
//裁剪
position:absolute;
clip:rect(0px 50px 200px 0px)
position:absolute;
left:0px;
top:0px;
z-index:-1
阅读全文
0 0
- CSS定位
- CSS定位
- CSS定位
- CSS定位
- CSS定位
- CSS定位
- CSS定位
- css 定位
- css 定位
- css定位
- CSS 定位
- css定位
- css定位
- css 定位
- CSS 定位
- css定位
- css 定位
- css定位
- 数组中重复的数字
- MUI 拍照和从系统相册选择图片上传
- git中Please enter a commit message to explain why this merge is necessary
- 从Mysql官网下载mysql.tar.gz版本的安装包
- 摩拜与ofo, 你们这是为了共享单车还是共享经济?
- css定位
- js ajax 常用函数
- Test.8 Point
- maven spring-boot 报Perhaps you are running on a JRE rather than a JDK?
- Eclipse 快速收起/展开方法结构快捷键设置
- cron表达式介绍
- Spring通过注释标签解决Ajax跨域访问以及Session失效的问题
- 浅谈 HotSpot 逃逸分析
- csv文件导入数据库工具类