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

网站设计介绍怎么写商城定制开发

网站设计介绍怎么写,商城定制开发,来个网站你知道的2022年,建设网银登录官网目录 一、flex布局实例:把色子放进盒子里 1、基础样式 二、justify-content 属性 三、flex-direction 属性 四、align-items 属性 五、flex-wrap 属性 二、flex布局应用到常见场景 非常详细的讲解flex布局,看一看,练一练! …

目录

一、flex布局实例:把色子放进盒子里

1、基础样式

二、justify-content 属性

三、flex-direction 属性

四、align-items 属性

五、flex-wrap 属性

二、flex布局应用到常见场景


非常详细的讲解flex布局,看一看,练一练!

一、色子场景示例

核心知识点:display: flex将容器变为弹性容器,内部元素(色子)变为弹性项目,遵循 flex 布局规则。
假设我们有一个盒子(容器)和1- 6 个色子(项目),每个色子代表一个 flex 项目。如果不了解flex布局,请先阅读  Flex弹性布局


1、基础样式

制作色子布局的基础样式,以下实例都需要用到如下样式:

<style>
/* 主容器:使用Flex布局排列6个色子面 */.dice-container {display: flex;flex-wrap: wrap;gap: 20px;padding: 20px;}/* 每个色子面的基本样式 */.dice {display: flex;width: 100px;height: 100px;border: 2px solid black;border-radius: 10px;background-color: white;padding: 10px;}/* 点的样式 */.dot {width: 20px;height: 20px;border-radius: 50%;background-color: black;}
</style>
二、justify-content 属性

 以下是css样式和html代码

 .justify-start-example {justify-content: flex-start;}
<div class="dice justify-start-example"><div class="dot"></div>
</div>

以下是css样式和html代码

.justify-end-example {justify-content: flex-end;}
    <div class="dice justify-end-example"><div class="dot"></div></div>

以下是css样式和html代码

.justify-center-example {justify-content: center;}
<div class="dice justify-center-example"><div class="dot"></div></div>

以下是css样式和html代码

.justify-space-between-example {justify-content: space-between;}
<div class="dice justify-space-between-example"><div class="dot"></div><div class="dot"></div></div>

 

 以下是css样式和html代码

 .justify-space-around-example {justify-content: space-around;}
<div class="dice justify-space-around-example"><div class="dot"></div><div class="dot"></div></div>

 

 以下是css样式和html代码

.justify-space-evenly-example {justify-content: space-evenly;}
<div class="dice justify-space-evenly-example"><div class="dot"></div><div class="dot"></div></div>
三、flex-direction 属性

以下是css样式和html代码

.flex-direction-row {flex-direction: row;}
<div class="dice flex-direction-row"><div class="dot"></div><div class="dot"></div></div>

以下是css样式和html代码

.flex-direction-column {flex-direction: column;}
<div class="dice flex-direction-column"><div class="dot"></div><div class="dot"></div></div>

 

以下是css样式和html代码

.flex-direction-row-reverse {flex-direction: row-reverse;}
<div class="dice flex-direction-row-reverse"><div class="dot white textcenter">1</div><div class="dot white textcenter">2</div></div>

 

以下是css样式和html代码

.flex-direction-column-reverse {flex-direction: column-reverse;}
<div class="dice flex-direction-column-reverse"><div class="dot white textcenter">1</div><div class="dot white textcenter">2</div></div>

 

四、align-items 属性

以下是css样式和html代码

.align-items-flex-start {align-items: flex-start;}
<div class="dice align-items-flex-start"><div class="dot"></div></div>

 

以下是css样式和html代码

.align-items-flex-end {align-items: flex-end;}
<div class="dice align-items-flex-end"><div class="dot"></div></div>

 

以下是css样式和html代码

.align-items-center {align-items: center;}
<div class="dice align-items-center"><div class="dot"></div></div>

 

以下是css样式和html代码

.align-items-baseline {align-items: baseline;}
<div class="dice align-items-baseline"><div style="background-color: aquamarine; padding: 5px; font-size: 12px;">1</div><div style="background-color: aquamarine; padding: 5px; font-size: 28px;">2</div><div style="background-color: aquamarine; padding: 5px; font-size: 18px;">3</div></div>

 

以下是css样式和html代码

.align-items-stretch {align-items: stretch;}
<div class="dice align-items-stretch"><div style="background-color: aquamarine; padding: 5px; color:#000">1</div><div style="background-color: aquamarine; padding: 5px; color:#000">2</div></div>

 

五、flex-wrap 属性

以下是css样式和html代码

.flex-wrap-nowrap {flex-wrap: nowrap;}
<div class="dice flex-wrap-nowrap"><div class="dot white textcenter">1</div><div class="dot white textcenter">2</div><div class="dot white textcenter">3</div><div class="dot white textcenter">4</div><div class="dot white textcenter">5</div><div class="dot white textcenter">6</div></div>

以下是css样式和html代码

.flex-wrap-wrap {flex-wrap: wrap;}
<div class="dice  flex-wrap-wrap"><div class="dot white textcenter">1</div><div class="dot white textcenter">2</div><div class="dot white textcenter">3</div><div class="dot white textcenter">4</div><div class="dot white textcenter">5</div><div class="dot white textcenter">6</div><div class="dot white textcenter">7</div><div class="dot white textcenter">8</div></div>

 

以下是css样式和html代码 

.flex-wrap-wrap-reverse {flex-wrap: wrap-reverse;}
<div class="dice flex-wrap-wrap-reverse"><div class="dot white textcenter">1</div><div class="dot white textcenter">2</div><div class="dot white textcenter">3</div><div class="dot white textcenter">4</div><div class="dot white textcenter">5</div><div class="dot white textcenter">6</div><div class="dot white textcenter">7</div><div class="dot white textcenter">8</div></div>

 

二、flex布局应用到常见场景

.dice.one {justify-content: center;align-items: center;}

 /* 两点:对角 */.dice.two {justify-content: space-between;}.dice.two .dot:nth-child(2) {align-self: flex-end;}

 

/* 三点:对角 */.dice.three {justify-content: space-between;}.dice.three .dot:nth-child(2) {align-self: center;}.dice.three .dot:nth-child(3) {align-self: flex-end;}

 

/* 四点:2x2网格 */.dice.four {flex-wrap: wrap;justify-content: space-between;align-content: space-between;}.dice.four .column {flex-basis: 100%;display: flex;justify-content: space-between;}

 

/* 五点:4角+中心 */.dice.five {flex-wrap: wrap;justify-content: space-between;align-content: space-between;}.dice.five .column {flex-basis: 100%;display: flex;justify-content: space-between;}.dice.five .column:nth-child(2) {justify-content: center;}

 

/* 六点:3x2网格 */.dice.six {flex-wrap: wrap;justify-content: space-between;align-content: space-between;}.dice.six .column {flex-basis: 100%;display: flex;justify-content: space-between;}

实例结合理论【 flex布局基础知识 】一定能做的很好!小伙伴们动手练习起来吧!


文章转载自:

http://divnk9AH.bydpr.cn
http://H0TiXyQN.bydpr.cn
http://VUBNM9lz.bydpr.cn
http://BCllQX9p.bydpr.cn
http://GwKKbZEH.bydpr.cn
http://Vv0VXvn8.bydpr.cn
http://rJ6Azqcl.bydpr.cn
http://I9CjRXxU.bydpr.cn
http://8pOVRZ9o.bydpr.cn
http://K0fMK6FT.bydpr.cn
http://gVyoyzws.bydpr.cn
http://hi4n5u0C.bydpr.cn
http://G0XCC9cV.bydpr.cn
http://ojGSddlw.bydpr.cn
http://jT6Jf3Ph.bydpr.cn
http://lgC9Ogdn.bydpr.cn
http://nhMXEK6v.bydpr.cn
http://agSTDKaD.bydpr.cn
http://DkeB08da.bydpr.cn
http://XG0YQL4c.bydpr.cn
http://5p0T8Mkc.bydpr.cn
http://kHhPHOQ1.bydpr.cn
http://1StosZyK.bydpr.cn
http://ZPKJeKOr.bydpr.cn
http://sL5NBFjK.bydpr.cn
http://FiRLh9Dr.bydpr.cn
http://WBqRMtUT.bydpr.cn
http://kE0tl0ws.bydpr.cn
http://eIX1LHWV.bydpr.cn
http://NsIrBJAg.bydpr.cn
http://www.dtcms.com/wzjs/633519.html

相关文章:

  • 百度收录公司网站百度知道官网
  • 如何提高网站的知名度百度推广免费送网站
  • 网站建设和管理情况汤阴县seo快速排名有哪家好
  • 网站策划与网上营销wordpress地址栏显示ip
  • 课题网站建设培训简讯深圳网站制作 论坛
  • 东莞手机网站设计公司做网站 传视频 用什么笔记本好
  • 做网站建设费用景安网站备案的服务码
  • 销售网站建设公司网站推广专家
  • 网站被重庆观音桥在哪个区
  • 做音乐网站需要版权么seo推广系统
  • 苏州免费网站制作建设工程施工合同示范文本2021
  • 南京电商网站建设公司排名旅游网站建设公司
  • 国外app素材网站psd网页模板免费下载
  • 公司网站制作费用wordpress博客简书
  • 桥头镇网站建设网站后台管理产品排序
  • 网站运营队伍与渠道建设如何高效的完成网站建设步骤
  • wordpress仿站js如何导入商城分销系统
  • 国内企业网站设计西安建公司网站
  • 一个小型购物网站开发甜品店网站开发背景
  • 怎么写代码做网站企业文化墙设计图效果图
  • 基于thinkphp网站制作广告设计是什么专业类别
  • 做网站是不是要域名费一般网站维护费用
  • 手机号码网站建设关键词优化外包服务
  • 福州做网站建设wordpress插件水印
  • 松江新城网站建设.网站开发工具dw
  • 做华为网站的还有哪些功能python培训机构哪家好
  • 网站的关键词报价的网站中文网站建设解决方案
  • 安徽网站建设产品介绍godaddy网站建设
  • 福州做网站互联网公司宿城网站建设
  • 沟通交流类网站有哪些广东宣布即时优化调整