当前位置:网站首页>加了定位的文字如何水平垂直居中
加了定位的文字如何水平垂直居中
2022-07-02 21:32:00 【成为自己的光ㄦ~】
//left: 50%;
//top: 50%;
//水平垂直居中
//transform: translate(-50%, -50%);
//这三个是使用绝对定位后使其垂直居中的解决方法
div{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 130px;
height: 100px;
z-index: 999;
opacity: 0.5;
}
//水平居中
p{
position: absolute;
bottom:10px;
left: 50%;
transform: translate(-50%, 0);
}
边栏推荐
- Jar package startup failed -mysql modify the default port number / set password free enter
- A river of spring water flows eastward
- China's crude oil heater market trend report, technological innovation and market forecast
- [shutter] statefulwidget component (image component | textfield component)
- qwb2018_ core kernel_ rop
- Pyqt picture decodes and encodes and loads pictures
- The web version of xshell supports FTP connection and SFTP connection
- How is LinkedList added?
- Cardinality sorting (detailed illustration)
- ctf-HCTF-Final-Misc200
猜你喜欢
How to test the process of restoring backup files?
One week dynamics of dragon lizard community | 2.07-2.13
26 FPS video super-resolution model DAP! Output 720p Video Online
[shutter] shutter layout component (Introduction to layout component | row component | column component | sizedbox component | clipoval component)
The neo4j skill tree was officially released to help you easily master the neo4j map database
MySQL learning record (9)
kernel tty_ struct
PIP version update timeout - download using domestic image
How does esrally perform simple custom performance tests?
Baidu sued a company called "Ciba screen"
随机推荐
Summary of the first week of summer vacation
【剑指 Offer 】56 - II. 数组中数字出现的次数 II
Golang string segmentation
System (hierarchical) clustering method and SPSS implementation
[shutter] shutter layout component (opacity component | clipprect component | padding component)
Chargement de l'image pyqt après décodage et codage de l'image
[dynamic planning] p1220: interval DP: turn off the street lights
MySQL learning record (2)
In depth research and investment feasibility report on the global and China active vibration isolation market 2022-2028
Go cache of go cache series
Common routines of compressed packets in CTF
[shutter] statefulwidget component (pageview component)
26 FPS video super-resolution model DAP! Output 720p Video Online
A river of spring water flows eastward
[hands on deep learning]02 softmax regression
[zero foundation I] Navicat download link
PIP version update timeout - download using domestic image
[shutter] shutter layout component (wrap component | expanded component)
MySQL learning notes (Advanced)
Import a large amount of data to redis in shell mode