当前位置:网站首页>Ionic4 learning notes 9 -- an east project 01
Ionic4 learning notes 9 -- an east project 01
2022-07-24 18:24:00 【tongle_ deng】
1、 overall situation CSS(src/global.scss At the bottom of )
/* overall situation css style */
body, div, ul, li, ol, h1, h2, h3, h4, h5, h6, input, textarea, select, p, dl, dt, dd, a, img, button, form, table, th, tr, td, tbody, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
margin: 0;
padding: 0;
}
html{
font-size: 62.5%;
}
.clearfix{
&::after{
display: block;
content: "";
height: 0px;
clear: both;
}
}2、 Common icon libraries are recommended
https://ionicons.com
lookup 、 Download the corresponding icon , Put in src/assets Under the table of contents .
Here you can download the icon of scanning code and message , When downloading, the size is set to 32px;
3、 stay tab1 Modify in page
<ion-toolbar>
<ion-buttons slot="start">
<img src="/assets/qrcode.png" />
</ion-buttons>
<ion-searchbar placeholder=" Please enter keywords " animated></ion-searchbar>
<ion-buttons slot="end" class="message">
<img src="/assets/message.png" />
<ion-badge color="danger" class="badge">8</ion-badge>
</ion-buttons>
</ion-toolbar>
add to CSS Modify the position between the message icon and the number of messages
Compiled as follows :

CSS as follows
.message{
position: relative;
.badge{
position: absolute;
right: -4px;
top:-4px;
font-size: 1rem;
}
}
ion-slide{
width: 100%;
height: 150px;
overflow: hidden;
img{
max-width: 100%;
}
}
.h_title{
padding: 1rem .5rem;
font-size: 1.4rem;
&::before{
display: inline-block;
border-left: 3px solid #f53d3d;
height: 14px;
width: 1px;
content: "";
top: 2px;
position: relative;
}
}
.hotlist{
width: 100%;
height: 10rem;
overflow-x: auto;
overflow-y: hidden;
ul{
// width: 120rem; Dynamic width
li{
width: 8rem;
height:10rem;
float: left;
margin-left: 1rem;
img{
width: 7rem;
height: 7rem;
}
p{
padding: .4rem;
text-align: center;
}
}
}
}
边栏推荐
- Namespace:集群环境共享与隔离
- Section 11 cache avalanche, hot data failure follow Daewoo redis ------- directory post
- Bib | mol2context vec: context aware deep network model learning molecular representation for drug discovery
- Inoic4 learning notes 2
- JS array method sort() collation parsing
- In depth analysis of the famous Alibaba cloud log4j vulnerability
- 【obs】依赖库: x264 vs 构建
- 4. Basic type and reference type?
- Highcharts chart and report display, export data
- 2022 the latest short video de watermarking analysis API interface sharing
猜你喜欢
随机推荐
JS to achieve progress steps (small exercise)
Matlab simulation of drawing circle on sphere
Maximum sum and promotion of continuous subarrays (2)
【“码”力全开,“章”显实力】2022年第1季Task挑战赛贡献者榜单
We have to understand the four scopes: application, session, request and page
Introduction and use of Pinia
1. Typeof view variable type?
Mozilla foundation released 2022 Internet health report: AI will contribute 15.7 trillion yuan to the global economy in 2030, and the investment in AI in the United States last year was nearly three t
Space three point circle code
Inheritance and Derive
mysql 配置文件
奶头乐理论介绍及个人感悟
【obs】视频、音频编码与rtmp发送的配合
如何用WebGPU流畅渲染百万级2D物体?
ORM introduction and database operation
Typora 它依然是我心中的YYDS 最优美也是颜值最高的文档编辑神器 相信你永远不会抛弃它
模拟实现vector
XSS bypass pose summary
Use of jumpserver
3. Variable declaration promotion?









