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

网站上的图片怎么替换网站备案中打不开

网站上的图片怎么替换,网站备案中打不开,如何快速网站排名,青岛网站建设开发目录 1采用flex弹性布局#xff1a; 2子绝父相margin#xff1a;负值#xff1a; 3.子绝父相margin:auto#xff1a; 4子绝父相transform#xff1a; 5通过伪元素 6table布局 7grid弹性布局 文字 水平垂直居中链接#xff1a;文字水平垂直居中-CSDN博客 以下为盒子…目录 1采用flex弹性布局 2子绝父相margin负值 3.子绝父相margin:auto 4子绝父相transform 5通过伪元素 6table布局 7grid弹性布局 文字 水平垂直居中链接文字水平垂直居中-CSDN博客 以下为盒子水平垂直居中 templatedivdiv classfatherdiv classson/div/div/div /template1采用flex弹性布局 在父元素设置display: flex表示该容器内部的元素将按照flex进行布局再设置align-items: center表示这些元素将相对于本容器水平居中justify-content: center实现垂直居中。 .father{width: 400px;height: 300px;background-color: rebeccapurple;display: flex;justify-content: center;align-items: center; } .son{width: 200px;height: 100px;background-color: aqua; }效果 2子绝父相margin负值 设置left和top为50%此时位置会偏右自身元素的宽高再设margin-left和margin-top为自身元素宽高的负一半实现水平垂直居中。 .father {width: 400px;height: 300px;background-color: rebeccapurple;position: relative; } .son {width: 200px;height: 100px;background-color: palegoldenrod;position: absolute;top: 50%;left: 50%;//宽度的一半margin-left: -100px;//高度的一半margin-top: -50px; } 效果 3.子绝父相margin:auto 设置top、left、right、bottom为0,在设置margin:auto .father{width:400px;height:300px;background-color: rebeccapurple;position: relative; //父级设置为相对定位}.son{width:100px;height:40px;background: red;position: absolute; //设置为子级绝对定位top:0;left:0;right:0;bottom:0;margin:auto;}效果 4子绝父相transform 设置left和top为50%此时位置会偏右自身元素的宽高再设transform: translateX(-50px) translateY(-50px); .father{width: 400px;height: 300px;background-color: rebeccapurple;position: relative; } .son{width: 200px;height: 100px;background-color: skyblue;position: absolute;left: 50%;top: 50%;transform: translateX(-100px) translateY(-50px); }效果 5通过伪元素 .father{width: 400px;height: 300px;background-color: rebeccapurple;text-align: center; } .father::before{content : ;display: inline-block;vertical-align: middle;height: 100%; } .son{width: 200px;height: 100px;background-color: pink;vertical-align: middle;margin: 0 auto;display: inline-block; }效果 6table布局 设置父元素为display:table-cell子元素设置 display: inline-block。利用vertical和text-align可以让所有的行内块级元素水平垂直居中。 .father {display: table-cell;width: 400px;height: 300px;background: rebeccapurple;vertical-align: middle;text-align: center; } .son {display: inline-block;width: 200px;height: 100px;background: forestgreen; }效果 7grid弹性布局 在父元素设置display: drid表示该容器内部的元素将按照flex进行布局再设置align-items: center表示这些元素将相对于本容器水平居中justify-content: center实现垂直居中。 .father{width: 400px;height: 300px;background-color: rebeccapurple;display: grid;justify-content: center;align-items: center; } .son{width: 200px;height: 100px;background-color: greenyellow; }效果
http://www.dnsts.com.cn/news/249660.html

相关文章:

  • 长春做个人网站做不了我的百度网盘登录入口
  • 中国建设网官方网站好听的网站名称
  • 网站建设花多少钱韶关做网站的
  • 校园时空网站建设分析建设的网站都是怎么赚钱
  • 企业网站关键词排名 swordpress的中文插件
  • 网站pc转移动端代码焦作做微信网站多少钱
  • 网站需求怎么写南京做网站seo的
  • 用python做网站的步骤网站制作公司站建设
  • 如何做html网站wordpress教育主题
  • 宣讲家网站官网加强作风建设网站通栏如何做特效
  • 蘑菇街网站模板公司网站上荣誉墙怎么做
  • 旅游电子商务网站有哪些企业做网站的费用计入什么科目
  • 网站制作公司北京网站建设公司哪家好WordPress里h1跟p有什么
  • 山东省建设厅职业资格注册中心网站下载软件应用
  • 做地方旅游网站目的意义从零自学编程免费
  • 市场营销策划公司优化网站入口页面的四个维度
  • 百度怎么做自己的网站阿里巴巴电脑版
  • 网站无备案号怎么办潍坊网站推广
  • 广州 电商设计网站建设现在去山东会被隔离吗?
  • 免费公司网站如何建立设计湖州网站制作公司
  • 网站优化方案范文wordpress汉化包
  • 马拉松网站建设方案wordpress小程序发表文章
  • 上海论坛网站建设网站建设解决方案服务商
  • 上海网站营销是什么网站开发中可能遇到的技术问题
  • 做网站最适合用多大的图片联想用来网站开发笔记本
  • 中美网站建设差异自助做网站
  • 教育公司 网站建设免费创立网站
  • 网上书城 网站建设策划书wordpress 图片显示插件
  • iis配置网站php网易企业邮箱免费入口
  • 城市建设网站的项目背景wordpress php 链接地址