当前位置:网站首页>Practice | mobile end practice
Practice | mobile end practice
2022-07-05 04:24:00 【Happy happy learning code】
1. Mobile terminal adaptive layout -- Infinite adaptation
There are two main points in this case , One is Taobao flexible.js file , The second is rem and px Conversion of , The third is to convert the size ratio of the picture
<!DOCTYPE html>
<html>
<head>
<!-- <meta charset="utf-8"> -->
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,use-scalable=no">
<title></title>
<script type="text/javascript" src="flexible.js"></script>
<style>
*{margin:0;padding:0;}
html,body,.container{
width:100%;
height:100%;
overflow: hidden;
}
ul{
list-style: none;
}
.container{
display: flex;
flex-direction: column;
}
header{
width:100%;
height:2.083333333333333rem;
}
header img{
width:100%;
height:100%;
}
section{
flex:1;
overflow: scroll;
background-color: #101010;
color:#fff;
}
section .item{
margin:30px;
}
section .item ul{
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
section .item ul li{
/* width:50%; */
display: flex;
flex-direction:column;
width:4rem;
height:2.34rem;
margin:5px 0;
font-size:16px;
}
.item-title{
display: flex;
justify-content: space-between;
align-items: center;
}
section .item img{
/* width:4.4rem; */
width:100%;
height:2.34rem;
/* height:100%; */
}
footer{
background-color: #1D1D1F;
}
footer ul{
width:100%;
height:2.133333rem;
display: flex;
justify-content: space-between;
align-items:center;
font-weight:800;
font-size:.4266666px;
color:white;
}
footer ul li{
flex:1;
text-align:center;
}
</style>
</head>
<body>
<div class="container">
<header>
<img src="img/1.jpg">
</header>
<section>
<div class="item">
<div class="item-title">
<h3> Learn now </h3>
<div> more </div>
</div>
<ul>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
</ul>
</div>
<div class="item">
<div class="item-title">
<h3> Appointment study </h3>
<div> more </div>
</div>
<ul>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
</ul>
</div>
<div class="item">
<div class="item-title">
<h3> Learn more </h3>
<div> more </div>
</div>
<ul>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
<li>
<img src="img/31.png">
<span> Learning learning learning </span>
</li>
</ul>
</div>
</section>
<footer>
<ul>
<li> home page </li>
<li> Online courses </li>
<li> Learning path </li>
<li> About us </li>
</ul>
</footer>
</div>
</body>
</html>
Learning recommendations :【 Deer thread 】 Mobile terminal adaptive layout - Infinite adaptation _ Bili, Bili _bilibili
边栏推荐
- About the project error reporting solution of mpaas Pb access mode adapting to 64 bit CPU architecture
- PHP reads the INI file and writes the modified content
- [finebi] the process of making custom maps using finebi
- 电源管理总线 (PMBus)
- 根据入栈顺序判断出栈顺序是否合理
- Threejs Internet of things, 3D visualization of factory
- Use threejs to create geometry and add materials, lights, shadows, animations, and axes
- Fonction (sujette aux erreurs)
- Interview related high-frequency algorithm test site 3
- MacBook安装postgreSQL+postgis
猜你喜欢
直播预告 | 容器服务 ACK 弹性预测最佳实践
[finebi] the process of making custom maps using finebi
托管式服务网络:云原生时代的应用体系架构进化
Threejs Internet of things, 3D visualization of farm (III) model display, track controller setting, model moving along the route, model adding frame, custom style display label, click the model to obt
SPI read / write flash principle + complete code
Longyuan war "epidemic" 2021 network security competition web easyjaba
函數(易錯)
美国5G Open RAN再遭重大挫败,抗衡中国5G技术的图谋已告失败
指针函数(基础)
Fuel consumption calculator
随机推荐
CSDN正文自动生成目录
Is "golden nine and silver ten" the best time to find a job? Not necessarily
学习MVVM笔记(一)
技术教程:如何利用EasyDSS将直播流推到七牛云?
A應用喚醒B應該快速方法
【虚幻引擎UE】运行和启动的区别,常见问题分析
Behavior perception system
快手、抖音、视频号交战内容付费
Basic analysis of IIC SPI protocol
如何实现实时音视频聊天功能
American 5g open ran suffered another major setback, and its attempt to counter China's 5g technology has failed
基于TCP的移动端IM即时通讯开发仍然需要心跳保活
MySQL: view with subquery in the from clause limit
Observable time series data downsampling practice in Prometheus
首席信息官如何利用业务分析构建业务价值?
Interview related high-frequency algorithm test site 3
PHP读取ini文件并修改内容写入
Convert Boolean to integer value PHP - Convert Boolean to integer value PHP
All in one 1413: determine base
取余操作是一个哈希函数