当前位置:网站首页>[untitled]
[untitled]
2022-04-21 12:29:00 【xiexuzhao】
CSS Center alignment Ultimate Guide
This article is published in my official account : Front end new world
Welcome to your attention
This article will discuss the methods that can be used to center aligned elements 6 Kind of CSS technology ( Sort by best practices ), And the most suitable scenario for each technology . here , Centering refers to placing an element at the horizontal and vertical center of its parent element .
.center Class represents the element to be centered
.parent Class represents its parent element .
1. Use transformation (Transform)
When to use :
When the width and height of the element are unknown ;
There are multiple child elements in the card pop-up box , One of the focus elements is in the center .
The idea is to use absolute positioning ——top and left 50%, Then apply the negative transformation .top and left The values used in are resolved according to the size of the parent element , and translate The value in the method is parsed according to the size of the element itself .
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
2. Use Flex
When to use :
When there is one or more elements to center ;
When the child element is dynamic and the size is unknown ;
When a line item needs to be centered like a footer .
The idea is to make the parent container flexbox And use flex Property centers the element horizontally and vertically , As shown below .
.parent {
display: flex;
justify-content: center;
align-items: center;
}
windows nginx Static resources To configure
https://www.jianshu.com/p/e798adcdea8c
http://localhost/imgs/124.jpg
# Refine Configure relevant static resource parameters , Optimize access to static resource files
location ~ .*\.(gif|jpg|jpeg|png)$ {
expires 24h;
root G:/nginx-1.21.6/nginx-1.21.6/html/imgs/;# Specify the image storage path
proxy_store on;
proxy_temp_path G:/nginx-1.21.6/nginx-1.21.6/html/imgs/;# Image access path
proxy_redirect off;
proxy_set_header Host 127.0.0.1;
client_max_body_size 10m;
client_body_buffer_size 1280k;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 40k;
proxy_buffers 40 320k;
proxy_busy_buffers_size 640k;
proxy_temp_file_write_size 640k;
if ( !-e $request_filename)
{
proxy_pass http://127.0.0.1;# Default 80 port
}
}
https://www.cnblogs.com/you-men/p/12827513.html
https://developer.aliyun.com/article/793181
https://blog.csdn.net/weixin_34246551/article/details/91547490?spm=1001.2101.3001.6650.14&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-14.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-14.pc_relevant_antiscanv2&utm_relevant_index=15
LuManager CDN
TaoBao :tengine
http://tengine.taobao.org/book/chapter_02.html#id1
https://www.nginx.cn/doc/
https://www.cnblogs.com/LRAB/p/13600907.html
windows nginx Load balancing
C:\Users\cmputer>g:
G:\>cd G:\nginx-1.21.6\nginx-1.21.6
G:\nginx-1.21.6\nginx-1.21.6>start nginx
G:\nginx-1.21.6\nginx-1.21.6>
nginx Default 80 port
Check the results http://localhost/
upstream my_web{
server 127.0.0.1:8011 weight=1;
server 127.0.0.1:8012 weight=2;
}
server {
listen 8010;
server_name my_web;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass http://my_web;
}
G:\nginx-1.21.6\nginx-1.21.6>nginx -s reload
Algorithm explain
Weighted polling weight The bigger the value is. , The more likely you are to visit
ip_hash Per request by access IP Of hash Result distribution , From the same IP Your request will access a fixed server
least_conn Minimum number of links , Which machine has less connections is allocated to that machine
url_hash According to the URL Of hash Allocation request , Every url Directed to the same server
hash Key values hash Self defined key
https://www.w3cschool.cn/nginxsysc/nginxsysc-cache.html
https://www.cnblogs.com/qdhxhz/p/8910174.html
https://www.cnblogs.com/fjytzh/archive/2011/05/27/2060079.html
https://www.cnblogs.com/bruce1992/p/14050236.html niu
https://www.cnblogs.com/handongyu/p/6410405.html
http://www.pinpaidadao.com/aliyun/?tags/54254
https://www.cnblogs.com/zhangchaocoming/p/15472884.html
https://www.cnblogs.com/itzgr/p/13321980.html
https://www.cnblogs.com/itzgr/p/13295013.html
https://www.cnblogs.com/zeq912/p/10013147.html
https://www.cnblogs.com/mrhelloworld/p/nacos-config.html
https://www.runoob.com/w3cnote/nginx-setup-intro.html
https://www.cnblogs.com/knowledgesea/p/5175711.html
Nginx Of proxy_store and proxy_cache What's the difference? ?
https://www.yisu.com/zixun/231959.html
https://support.huaweicloud.com/topic/1240666-5-n
https://www.cnblogs.com/Mrchengs/p/11940240.html
https://www.laobuluo.com/1119.html
https://www.cnblogs.com/kevingrace/p/5892169.html
https://www.cnblogs.com/leefreeman/p/3998757.html
https://www.cnblogs.com/three-fighter/p/14757813.html
https://www.cnblogs.com/smallSevens/p/7554380.html
https://www.cnblogs.com/wangtao_20/p/4582701.html
https://www.cnblogs.com/mindwind/p/5339657.html
https://www.cnblogs.com/mrhelloworld/p/nginx.html
https://www.cnblogs.com/mrhelloworld/p/redis-architecture.html
https://www.cnblogs.com/sheng-jie/p/Deploy-ASP-NET-CORE-WITH-REVERSE-PROXY.html
https://www.hellorf.com/
https://www.cnblogs.com/daizhj/archive/2010/06/24/1667422.html
https://www.kemaowang.org.cn/
https://www.yshuq.com/?p=12606
https://mirrors.tuna.tsinghua.edu.cn/apache/
https://blog.51cto.com/u_15015155/2554672
https://baijiahao.baidu.com/s?id=1680650957579563541&wfr=spider&for=pc
https://github.com/alibaba/nacos
https://github.com/alibaba/spring-cloud-alibaba
https://github.com/alibaba/Sentinel
https://icomoon.io/#icons
https://github.com/alibaba/lowcode-engine
https://github.com/davideuler/architecture.taobao-alibaba
https://github.com/alibaba/arthas
https://github.com/alibaba/p3c
https://github.com/wuyouzhuguli/SpringAll
版权声明
本文为[xiexuzhao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211218382554.html
边栏推荐
- nodejs 如何将 Buffer 数据转为 String
- 弹性架构内容和成本探讨-数字化架构设计(3)
- 通过列表修改字符串的坑
- How does electron net send a post request
- import in protocol buffer
- Kubernetes service discovery monitoring apiserver
- What's the difference between you and the architect? How to improve
- Study notes of "deep learning" (VII)
- 实例:用C#.NET手把手教你做微信公众号开发(7)--普通消息处理之位置消息
- 分享几款我在高频使用的 Chrome 浏览器插件,每一个都好用到飞起
猜你喜欢

Validation数据校验注解

AAAI2022|基于概率软逻辑的无偏时序常识知识推理

Kubernetes service discovery monitoring apiserver

Reverse crawler 30 verification code of a fourth generation slider

风丘科技为您提供10M以太网解决方案

“如何实现集中管理、灵活高效的CI/CD”在线研讨会精彩内容分享

游戏行业实战案例2:玩家等级

The non display of markerarray caused by the ROS version problem has been solved
2020batjz Android Senior Engineer Interview Questions - multiple choice questions collection (with answer analysis)

顶流“健身博主”刘畊宏
随机推荐
华润怡宝被传IPO,农夫山泉或将迎来早年“宿敌”
AGP Transform API 被废弃意味着什么?
ASM插桩之美
數據庫,把另一張錶某字段數據添加到另一個錶中,同時加入的時候加入自己需要的數據
Discussion on content and cost of elastic Architecture - Digital Architecture Design (3)
CVPR 2022 Oral|港中文开源PoseC3D:基于3D-CNN的骨骼动作识别框架
WordPress Amministrazione Aperta 3.7.3 任意文件读取
Couleurs du thème sublime
字符串计数(转换为进制)
import in protocol buffer
Introduction notes to PHP zero Foundation (11): String
Detailed explanation of chrome developer tools I
阿里天池比赛——街景字符编码识别
Long Zhi was assessed as CMMI [3]
CVPR 2022 oral | Hong Kong Chinese open source posec3d: skeleton motion recognition framework based on 3d-cnn
有效三角形的个数 (双指针(逆向扫描)+二分)
只出现一次的数字 II(哈希、位操作、逻辑电路、有限状态自动机)
风丘科技为您提供10M以太网解决方案
Musk lives in the old Internet age?
“如何实现集中管理、灵活高效的CI/CD”在线研讨会精彩内容分享