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

网站渠道建设天津塘沽网站建设

网站渠道建设,天津塘沽网站建设,泰安市住宅与房产信息网,网站制作方案怎么做黑马程序员JS学习时的一个案例#xff0c;CSS有点不懂#xff0c;单拎出来分析。 具体出处是某站视频中的数组篇讲解#xff0c;#xff08;点击链接跳转#xff09; CSS案例 效果代码1. 先分析最大的boxflex布局 justify-contentalign-items以 flex-end 为例 2. box… 黑马程序员JS学习时的一个案例CSS有点不懂单拎出来分析。 具体出处是某站视频中的数组篇讲解点击链接跳转 CSS案例 效果代码1. 先分析最大的boxflex布局 justify-contentalign-items以 flex-end 为例 2. box中的dix分析步骤1flex-direction 步骤2步骤3 效果代码 !DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle* {margin: 0;padding: 0;}.box {display: flex; /*flex*/width: 700px;height: 300px;border-left: 1px solid pink;border-bottom: 1px solid pink;margin: 50px auto; /*上下50px 左右auto居中*/justify-content: space-around; align-items: flex-end; text-align: center;}.boxdiv {display: flex;width: 50px;background-color: pink;flex-direction: column;justify-content: space-between;}.box div span {margin-top: -20px;}.box div h4 {margin-bottom: -35px;width: 70px;margin-left: -10px;}/style /headbodydiv classboxdiv styleheight: 123px;span123/spanh4第1季度/h4/divdiv styleheight: 156px;span156/spanh4第2季度/h4/divdiv styleheight: 120px;span120/spanh4第3季度/h4/divdiv styleheight: 210px;span210/spanh4第4季度/h4/div/divscript/script /body/html1. 先分析最大的box flex布局 这些都是flex布局中的 display: flex; 为了能够更好区别先设置主轴x轴justify-content再设置侧轴y轴align-items justify-content 属性值说明flex-start默认值项目向水平方向的起点对其flex-end水平方向的终点对齐center项目在水平方向上居中space-between最左最右靠边中间间距相等space-evenly水平方向的终点对齐space-around每个项目的左右撑开距离相等 跳转链接查看 align-items 该属性用于控制子元素在侧轴默认为y轴上的排列方式在子元素为单项时使用 属性值说明flex-start从上到下默认值flex-end从下到上center垂直居中stretch注意子元素不设置高度否则没有效果 以 flex-end 为例 !DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlebodydiv classboxdiv styleheight: 200px;/divdiv styleheight: 100px;/divdiv styleheight: 300px;/div/div/bodystyle* {margin: 0;padding: 0;}.box {width: 700px;height: 300px;border-left: 3px solid pink;border-bottom: 3px solid pink;margin: 50px auto;display: flex;justify-content: space-around;align-items: flex-end;}.boxdiv {width: 50px;background-color: pink;}/style /head /html2. box中的dix分析 一个div中有2个元素 div styleheight: 120px;span120/spanh4第3季度/h4 /div这里以一个柱状图为例。 步骤1 !DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlebodydiv classboxspanxxxx/spanh4第x季度/h4/div/bodystyle* {margin: 0;padding: 0;}.box {width: 300px;height: 700px;background-color: pink;margin: 50px auto;}/style /head /htmlflex-direction flex-direction: 决定主轴的方向(即项目的排列方向) flex-direction column 主轴为垂直方向起点在上沿 这篇文章写的好点击跳转链接 此时我们的div中有两个元素span和h4想让他一个在上一个在下就先设置主轴方向为垂直方向。然后 justify-content: space-between;最左最右靠边中间间距相等 步骤2 !DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlebodydiv classboxspanxxxx/spanh4第x季度/h4/div/bodystyle* {margin: 0;padding: 0;}.box {width: 300px;height: 700px;background-color: pink;margin: 50px auto;display: flex;flex-direction: column;justify-content: space-between;}/style /head /html步骤3 添加了text-align: center;等 这里设置了黄色是为了更好看清楚。 !DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlebodydiv classboxspanxxxx/spanh4第x季度/h4/div/bodystyle* {margin: 0;padding: 0;}.box {width: 300px;height: 700px;background-color: pink;margin: 50px auto;display: flex;flex-direction: column;justify-content: space-between;text-align: center;}.box span {margin-top: -20px;background-color: yellow;}.box h4 {margin-bottom: -35px;width: 300px;background-color: yellow;}/style /head/html
http://www.pierceye.com/news/250841/

相关文章:

  • 江门市网站建设 熊掌号wordpress分类不显示图片
  • 上海做网站技术有趣的网站小游戏
  • 网站建设需要哪些内容中国建设银行对公网站
  • 网站菜单实现原理全网营销外包
  • 江阴招聘网站建设学徒开源网站开发文档下载
  • 金融网站开发公司六安城市网新闻
  • 什邡网站建设公司linux怎么使用wordpress
  • 安阳网站建设公司网络推广的目标
  • 人像摄影网站有哪些贵阳网站制作企业
  • 山西山西省建设厅网站首页哪个网站做分享赚佣金
  • 曲靖网站制作一条龙赣州章贡区邮政编码是多少
  • 海南省网站设计公司网址百度小说风云榜排名
  • 刷网站关键词排名原理寮步建设网站
  • 银川网站建设一条龙服务服装行业网站模板
  • 重庆建站程序建筑网站起名
  • 便宜网站制作wordpress函数手册
  • 适合在家做的网站工作做音乐网站要求
  • 在哪个网站做视频赚钱的建设彩票网站需要多少投资
  • 大连网站建设意动科技推荐做那个的电影网站
  • 博达 网站群建设wordpress打开乱码
  • 电商网站建设代理商定制网站开发介绍图
  • 网站系统问题解决措施上海网站建设系
  • c 做网站简单吗ui设计需要学什么软件
  • 网站建设app开发公司国内免备案空间
  • nas 支持做网站dedecms 做影网站
  • 网上商城网站模板广州建设技术职业学院
  • 养生网站模板下载山东网站建设哪家专业
  • 最新电子产品网站模板网站建设公司 腾佳
  • 跟公司产品做网站用什么程序做网站最好优化
  • 在线代理网页浏览网站山东省城乡住房建设厅网站