兼容各种浏览器的水平和垂直居中的CSS代码
admin 114 2019-03-09 21:57:41
<figure class='logo'>
<span></span>
<img class='photo'/>
</figure>
.logo {
display: block;
text-align: center;
display: block;
text-align: center;
vertical-align: middle;
border: 4px solid #dddddd;
padding: 4px;
height: 74px;
width: 74px; }
.logo * {
display: inline-block;
height: 100%;
vertical-align: middle; }
.logo .photo {
height: auto;
width: auto;
max-width: 100%;
max-height: 100%; }
To share this paste please copy this url and send to your friends
预览
还没有评论.
最新分享
- PHP用redis实现计数器功能从而实现限流
PHP | 48 | 2周前
- PHP批量下载QQ空间相册照片链接
PHP | 42 | 2周前
- PHP对一个接口进行请求次数限制
PHP | 32 | 2周前
- PHP汉字转拼音类文件
PHP | 34 | 2周前
- laravel 表单验证 api自定义错误信息返回json 与 路由别名场景验证
PHP | 37 | 2周前
- QQ或微信内打开网站提示用浏览器打开代码
PHP | 57 | 3周前
- 简易防CC攻击刷新跳转代码
PHP | 55 | 3周前