2020-03-09日常

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

*{

margin: 0;

padding: 0;

}

li{

list-style: none;

}

.box{

width: 538px;

height: 348px;

margin: 50px auto;

border: 5px solid #e0dfcc;

display: flex;

flex-wrap: wrap;

/*justify-content: space-between;*/

}

.box p{

width: 538px;

height: 49px;

background: #666666;

display: flex;

justify-content: center;

align-items: center;

}

.box ul{

width: 538px;

height: 250px;

display: flex;

}

.box li:nth-child(1){

width: 146px;

height: 250px;

display: flex;

justify-content: center;

align-items: center;

background: #77bbdd;

}

.box li:nth-child(2){

width: 282px;

height: 250px;

display: flex;

justify-content: center;

align-items: center;

background: #d6d6d6;

}

.box li:nth-child(3){

width: 110px;

height: 250px;

display: flex;

text-align: center;

justify-content: center;

align-items: center;

background: #ff6633;

}

</style>

</head>

<body>

<div class="box">

<p>#header</p>

<ul>

<li>#left</li>

<li>#center</li>

<li>

#right<br />

margin-right:<br />

-150px;

</li>

</ul>

<p>#footer</p>

</div>

</body>

</html>



<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

*{

margin: 0;

padding: 0;

}

li{

list-style: none;

}

.box{

width: 750px;

height: 540px;

margin: 50px auto;

}

.box ul{

width: 750px;

height: 540px;

margin: 50px auto;

background: yellowgreen;

display: flex;

flex-wrap: wrap;

/*align-content: space-between;*/

align-items: center;

}

.box li{

width: 186px;

height: 178px;

display: flex;

align-items: center;

justify-content: center;

flex-direction: column;

}

.box li img{

display: block;

margin: 7px 0 24px;

}

</style>

</head>

<body>

<div class="box">

<ul>

<li>

<img src="img/图层-2.png"/>

1

</li>

<li>

<img src="img/图层-3.png"/>

2

</li>

<li>

<img src="img/图层-4.png"/>

3

</li>

<li>

<img src="img/图层-5.png"/>

4

</li>

<li>

<img src="img/图层-2.png"/>

1

</li>

<li>

<img src="img/图层-3.png"/>

2

</li>

<li>

<img src="img/图层-4.png"/>

3

</li>

<li>

<img src="img/图层-5.png"/>

4

</li><li>

<img src="img/图层-2.png"/>

1

</li>

<li>

<img src="img/图层-3.png"/>

2

</li>

<li>

<img src="img/图层-4.png"/>

3

</li>

<li>

<img src="img/图层-5.png"/>

4

</li>

</ul>

</div>

</body>

</html>


<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style>

.box{

width: 720px;

height: 97px;

border-bottom: 1px solid red;

margin: 50px auto;

display: flex;

align-items: center;

justify-content: space-between;

padding: 0 34px 0 32px;

box-sizing: border-box;

}

.box i{

display:block;

width: 32px;

height: 32px;

/*border-bottom: 1px solid red;*/

}

.box i:nth-child(1){

width: 40px;

}

.box form{

width: 536px;

height: 56px;

border-radius: 5px;

position: relative;

}

img{

width: 36px;

height: 36px;

}

.q1{

position: absolute;

left: 5px;

top: 16px;

}

.box input{

width: 536px;

height: 56px;

background: none;

text-indent: 59px;

}

/*弹性盒实现元素水平垂直居中*/

.w1{

width: 500px;

height: 500px;

border: 1px solid #000;

margin: 50px auto;

display: flex;

/*水平垂直居中,方法二*/

justify-content: center;

align-items: center;

}

.w1 div{

width: 200px;

height: 200px;

background: yellowgreen;

/*水平垂直居中,方法一*/

/*margin: auto;*/

}

</style>

</head>

<body>

<div class="box">

<i><img src="img/图层-2.png"/></i>

<form action="">

<img class="q1" src="img/图层-5.png"/>

<input type="text" value="aaaaaaa"/>

</form>

<i><img src="img/图层-4.png"/></i>

</div>

<div class="w1">

<div></div>

</div>

</body>

</html>

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • H5移动端知识点总结 阅读目录 移动开发基本知识点 calc基本用法 box-sizing的理解及使用 理解dis...
    Mx勇阅读 4,666评论 0 26
  • 移动开发基本知识点 一.使用rem作为单位 html { font-size: 100px; } @media(m...
    横冲直撞666阅读 3,548评论 0 6
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    love2013阅读 2,350评论 0 11
  • 各种纯css图标 CSS3可以实现很多漂亮的图形,我收集了32种图形,在下面列出。直接用CSS3画出这些图形,要比...
    剑残阅读 9,721评论 0 8
  • 一、简介 1.1、flex 布局 (Flexible布局,弹性布局)是在小程序里面常用的布局方式官方文档:flex...
    IIronMan阅读 581评论 0 2