当前位置: 首页 > news >正文

ps做的网站怎么到网站上预览西乡建网站

ps做的网站怎么到网站上预览,西乡建网站,怎么搭建Wordpress博客,河南微网站建设公司哪家好关于CSS position#xff0c;来自MDN的描述#xff1a;CSS position属性用于指定一个元素在文档中的定位方式。top、right、bottom、left 属性则决定了该元素的最终位置。先看一个图片#xff1a;child没设置position的样式代码如下#xff1a;child1-1child1-2child1-3chi…关于CSS position来自MDN的描述CSS position属性用于指定一个元素在文档中的定位方式。top、right、bottom、left 属性则决定了该元素的最终位置。先看一个图片child没设置position的样式代码如下child1-1child1-2child1-3child1-4.parent1{background-color: chocolate;width: 300px;height: 300px;margin: 25px 50px 75px;}.child1-1{background-color: cornflowerblue;width: 60px;height: 60px;}.child1-2{background-color:crimson;width: 60px;height: 60px;}.child1-3{background-color:darkcyan;width: 60px;height: 60px;}.child1-4{background-color: darkgreen;width: 60px;height: 60px;}这里展示的就是一个正常“文档流”Normal flowBoxes in the normal flow belong to a formatting context, which may be block or inline, but not both simultaneously. Block-level boxes participate in a block formatting context. Inline-level boxes participate in an inline formatting context.个人理解顾名思义就是像写文档一样一行一行的排列如图每个child 都是一个60*60 的小方块即使在他们右边有多余的位置但是它们还是占一行。position就是每个元素的定位属性而默认就是 position static即上图中parent 和 child 都是展示的文档流样式。而position属性一共有以下取值static默认值。没有定位元素出现在正常的流中(忽略 top, bottom, left, right 或者 z-index 声明)relative生成相对定位的元素相对于其正常位置进行定位。 如我们将上面的代码改成// ....child1-2{background-color:crimson;width: 60px;height: 60px;position: relative;left: 20px;top: 30px;}relative可以看到 child1-2 在原来的位置上左边多出了 20px 距离顶部多出了 30pxabsolute生成绝对定位的元素相对于 static 定位以外的第一个父元素进行定位。我们将上例的child1-2恢复然后操作child1-3.child1-3{background-color:darkcyan;width: 60px;height: 60px;position: absolute;left: 20px;top: 30px;}absolute可以看到child1-3 的位置已经和 parent 无关了(因为 parent 的 position static),很多时候都会将 parent 设置成relative 来和 absolute child 配合使用。我们再改一下 child1-3 的代码.child1-3{background-color:darkcyan;width: 60px;height: 60px;position: absolute;left: 20px;bottom: 30px; // 注意这个}bottom 30pxbottom 30px 增加浏览器的高度可以看到child1-3 其实是一直跟着浏览器的高度在变化的。fixed.child1-4{background-color: darkgreen;width: 60px;height: 60px;position: fixed;bottom: 30px;left: 70px;}fixed而且当浏览器高度变化时他们两个也会跟着变化。但是两者的区别就在于当 parent 设置成 position relative 时.parent1{background-color: chocolate;width: 300px;height: 300px;margin: 25px 50px 75px;position: relative;}parent position relative即此时child1-3 的 leftright 等以 parent 为基准。inherit规定应该从父元素继承 position 属性的值。这个就不需要图解了。。。。
http://www.zqtcl.cn/news/108864/

相关文章:

  • 外链网站推荐几个html5标准网站建设
  • 博星卓越营销网站设计古镇镇建网站公司
  • 3. 是网站建设的重点网站后台添加关键词
  • 免费手机网站模板下载百度网站建设北京
  • 爱用建站建设网站的报告
  • 网站关键字被百度收录网站开发asp.net
  • 内部卷网站怎么做的h5在线编辑器
  • 搞定设计网站做的图怎么下载不了网站死链接怎么删除
  • 济南企业建站怎么样在pc端预览手机网站
  • c 手机网站开发模板最好的建站网站
  • 防城港市网站建设成功网站建设案例
  • 成都公司网站制作公司实验一 电子商务网站建设与维护
  • 即墨区城乡建设局网站300m空间够用吗 wordpress
  • 成都软件开发培训机构7个湖北seo网站推广策略
  • 嘉定企业网站建设深圳网站制作费用
  • 外贸网站有必要吗wordpress远程保存图片
  • 苏州吴中网站建设wordpress中文版安装教程
  • wordpress 网站静态页面赶集网网站建设分析
  • 伊春网站开发大型网站建设兴田德润专业
  • 温州平阳县营销型网站建设榆林做网站
  • 沽源网站建设娄底网站建设工作室
  • 商场网站 策划医疗网站是否全部需要前置备案
  • 电商网站开发实训心得wordpress网络验证
  • 美图网seo 优化技术难度大吗
  • 知名的传媒行业网站开发天空网站开发者
  • 网站域名年费多少钱二手手表交易平台哪个好
  • 用易语言做抢购网站软件下载自己可以做企业网站吗
  • 公司网站续费帐怎么做互联网专业
  • 网站开发公司深圳外贸营销策略
  • 主要搜索引擎网站搜索结果比较wordpress novelist