css中postion的fixed的用法
来源:互联网 发布:四川省审计厅数据采集 编辑:程序博客网 时间:2024/04/29 06:53
CSS中position属性有4种可选值:static,relative,absolute,fixed,用于定位html元素的位置,并影响元素块生成的方式。这里向大家描述一下position:fixed 的使用,此属性元素的定位方式同absolute类似,但它的包含块是视区本身。
先看代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>无标题文档</title><style>body{width:100%;height:1350px;margin:0;}.heade input{background-color:#FFFFFF;width:700px;height:30px;font-size:24px;position:fixed;left:300px;}.heade span{font-family:"宋体";font-size:24px;color:#0033FF;position:fixed;left:1010px;}</style></head><body><div class="heade"><input type="text"/><span class="span">搜索</span></div></body></html>你只需要把指定的div设置成fixed就可以实现浮动的效果,方便有快捷!
0 0
- css中postion的fixed的用法
- css中postion的fixed的用法
- css中postion的fixed与absolute区别详解
- HTML&CSS——css中postion的fixed与absolute区别详解
- 解决android webkit的css postion:fixed支持问题【转】
- css postion 理解 absolute 和fixed的区别
- CSS中position:fixed的用法
- CSS的POSTION属性
- ie6对postion:fixed的完美解决方案
- css中table-layout:fixed 属性的用法
- css中table-layout:fixed 属性的用法
- css中table-layout:fixed 属性的用法
- css中postion的absolute、relative的实例
- CSS postion中z-index负值的应用
- HTML基础(二):css postion 的详细解释
- css postion的两种属性学习 absolute 和 relative
- CSS布局的基本原理:盒模型、display、postion和float
- CSS中position中属性absolute与fixed的区别
- DUXCMS 2.x学习问题(一)
- Amazon S3 FOR PHP 使用总结
- 多个方面比较电路交换、报文交换和分组交换的主要优缺点
- CMake 需要重点记住的命令和量(待续)
- 集合的运算
- css中postion的fixed的用法
- megre和viewstub
- 友盟2013年中国移动互联网年度报告
- 时钟(AnalogClock和 DigitalClock)的功能与用法
- 【Android UI设计与开发】第03期:引导界面(三)仿微信引导界面以及动画效果
- 艾维博客:3.15网友大吐槽:最恨5大乱象!
- 腾讯后台开发面试经验
- extjs3 设置本地store &&远程
- EL学习过程(三)