当前位置:网站首页>When image component in wechat applet is used as background picture
When image component in wechat applet is used as background picture
2022-07-25 04:58:00 【richest_ qi】
List of articles
present situation

The files involved in the applet project code are :
- pages/about/about.wxml
- pages/about/about.wxss
pages/about/about.wxml
<view class="aboutContainer">
<image src="/static/images/aito.jpg"></image>
<view class="title">AITO Ask boundary M5</view>
</view>
pages/about/about.wxss
.aboutContainer{
width: 100%;
}
.aboutContainer image{
width: 100%;
height: 480rpx;
}
.aboutContainer .title{
width: 500rpx;
height:300rpx ;
line-height: 300rpx;
text-align: center;
border: 1px solid red;
font-size: 36rpx;
}
demand
<image src="/static/images/aito.jpg"></image> Use as background , Text "AITO Ask boundary M5" Place in the vertical center of the background picture .
Realization

The documents involved in the code change are :pages/about/about.wxss.
pages/about/about.wxss
.aboutContainer{
width: 100%;
position: relative;
}
.aboutContainer image{
width: 100%;
height: 480rpx;
}
.aboutContainer .title{
position: absolute;
left: 50%;top: 50%;
margin-left: -250rpx;
margin-top: -150rpx;
width: 500rpx;
height:300rpx ;
line-height: 300rpx;
text-align: center;
/* border: 1px solid red; */
color: #fff;
font-size: 36rpx;
}
边栏推荐
- Luogu p4281 [ahoi2008] emergency gathering / gathering solution
- Data link layer protocol -- Ethernet protocol
- Today is important
- 2、 Mysql database foundation
- Blog Description & message board
- How to get the database creation time?
- 2022-7-13 summary
- The 6th "Blue Hat Cup" National College Students' Cyber Security Skills Competition writeup
- 2022-7-18 summary
- Thinking of reading
猜你喜欢

Now the operator wants to check the answer details of all user questions from Zhejiang University. Please take out the corresponding data

Paper:《Peeking Inside the Black Box: Visualizing Statistical Learning with Plots of Individual Condi

Database design process

If you don't know these 20 classic redis interview questions, don't go to the interview!

实战|记一次攻防演练打点

Actual combat | record an attack and defense drill management

5年经验的大厂测试/开发程序员,怎样突破技术瓶颈?大厂通病......
![[analysis of GPIO register (crl/crh) configuration of STM32]](/img/63/a7b262e95f1dc74201ace9d411b46f.png)
[analysis of GPIO register (crl/crh) configuration of STM32]

Summary and Prospect of aut, the transport layer protocol of sound network -- dev for dev column

数据链路层协议 ——— 以太网协议
随机推荐
Xiaohongshu joins hands with HMS core to enjoy HD vision and grow grass for a better life
Leetcode55. Jumping game
[CTF learning] steganography set in CTF -- picture steganography
Actual combat | record an attack and defense drill management
MySQL -- index and transaction isolation level
Salt and ice particles cannot be distinguished
阿亚的角度思考
etcd学习
Introduction to FileStream class of C #
C# 之 FileStream类介绍
Baklib: share some methods about building enterprise knowledge management (km)
When developing or debugging the IP direct scheme, it should be noted that the host value should be consistent with the direct IP
Very clear organization
Etcd learning
盐粒和冰粒分不清
I didn't expect Mysql to ask these questions
Summary and Prospect of aut, the transport layer protocol of sound network -- dev for dev column
Completed project series Tutorials - smart campus management system
Luogu p4281 [ahoi2008] emergency gathering / gathering solution
Introduction to fundamentals of operations research [1]