当前位置:网站首页>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
边栏推荐
- Threejs implements labels and displays labels with custom styles
- The scale of computing power in China ranks second in the world: computing is leaping forward in Intelligent Computing
- web资源部署后navigator获取不到mediaDevices实例的解决方案(navigator.mediaDevices为undefined)
- provide/inject
- Ffmepg usage guide
- 【虛幻引擎UE】實現UE5像素流部署僅需六步操作少走彎路!(4.26和4.27原理類似)
- Mxnet imports various libcudarts * so、 libcuda*. So not found
- How to realize real-time audio and video chat function
- 揭秘技术 Leader 必备的七大清奇脑回路
- Aperçu en direct | Services de conteneurs ACK flexible Prediction Best Practices
猜你喜欢
电源管理总线 (PMBus)
函數(易錯)
Learning notes 8
Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
概率论与数理统计考试重点复习路线
小程序中实现文章的关注功能
[uniapp] system hot update implementation ideas
【虛幻引擎UE】實現UE5像素流部署僅需六步操作少走彎路!(4.26和4.27原理類似)
About the project error reporting solution of mpaas Pb access mode adapting to 64 bit CPU architecture
Uni app change the default component style
随机推荐
[Chongqing Guangdong education] 2408t Chinese contemporary literature reference test in autumn 2018 of the National Open University
机器学习 --- 神经网络
Sword finger offer 07 Rebuild binary tree
[illusory engine UE] method to realize close-range rotation of operating objects under fuzzy background and pit recording
Possible stack order of stack order with length n
Function (error prone)
Threejs realizes the drawing of the earth, geographical location annotation, longitude and latitude conversion of world coordinates threejs coordinates
Technical tutorial: how to use easydss to push live streaming to qiniu cloud?
open graph协议
Sequelize. JS and hasmany - belongsto vs hasmany in serialize js
官宣!第三届云原生编程挑战赛正式启动!
C26451: arithmetic overflow: use the operator * on a 4-byte value, and then convert the result to an 8-byte value. To avoid overflow, cast the value to wide type before calling the operator * (io.2)
解密函数计算异步任务能力之「任务的状态及生命周期管理」
假设检验——《概率论与数理统计》第八章学习笔记
Kwai, Tiktok, video number, battle content payment
A application wakes up B should be a fast method
Managed service network: application architecture evolution in the cloud native Era
CSDN正文自动生成目录
Sequence diagram of single sign on Certification Center
Components in protective circuit