惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - 轻松

How to create custom methods for use in spring security expression language annotations How to check “hasRole” in Java Code with Spring Security? Android 显示/隐藏 应用图标 Android 当媒体变更后,通知其他应用重新扫描 Dynamically loading an external JavaScript or CSS file android 脸部抠图 IIS + TOMCAT 注意事项 textbox icon jquery 插件 让IE支持HTML5的Canvas vba 生成euc文件的方法 - 轻松 - 博客园 数值项目的格式化 - 轻松 - 博客园 [原创]让Allvidoes插件支持 优酷(www.youku.com)的视频 ORACLE ERROR CODE代表的意思 http://hi.baidu.com/czh0221/blog/item/9f0447e719644a2ab83820c6.html [转]利用location的hash值来解决Ajax两大难题 JAVA 调用Web Service的方法 xampp-control中启动Apache时80断口被占用的错误 asp.net mail java获取运行的jar(class)文件的路径
css div 垂直居中
轻松 · 2014-09-18 · via 博客园 - 轻松

参考:http://css-tricks.com/centering-in-the-unknown/

<style>
.valign {
  font-size: 0px;/* clear spacing*/
}
.valign:before {
  content: '';
  display: inline-block;
  height: 100%;
  vertical-align: middle;
  margin-right: -0.25em; /* Adjusts for spacing */
}
.valign-middle,
.valign-bottom {
  display: inline-block;
  font-size: 1rem;
}
.valign-middle {
  vertical-align: middle;
}
.valign-bottom {
  vertical-align: bottom;
}
</style>
<div class="valign" style="height: 20rem;border:1px solid red;">
   <div class="valign-middle" style="border:1px solid blue;">
      我在中间
  </div>
</div>
<br>
<div class="valign" style="height: 20rem;border:1px solid red;">
   <div class="valign-bottom" style="border:1px solid blue;">
      我在底部
  </div>
</div>