<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Vertical-align</title> <style type="text/css"> .container{ width: 300px; height: 400px; margin: 50px auto; border: 1px solid #ccc; display: table; } .img{ text-align: center; vertical-align: middle; display: table-cell; } img{ width: 260px; height: 350px; } </style> </head> <body> <div class="container"> <div class="img"> <img src="your_image.jpg"> </div> </div> </body> </html>
XHTMT|
HTML5|
CSS|
HTML DOM|
jQuery|
JSON|
AJAX|
LESS|
HTML|
Bootstrap|
Foundation|
AngularJS|
Ember.js|
TypeScript|
AngularJS2|
React|
jQuery UI|
jQuery EasyUI|
Node.js|
Highcharts|
Echarts|
Vue.js|
CoffeeScript|
Ext.js|
Meteor|
SASS|
Omi|
Markdown|
前端开发规范|
浏览器|
webpack|
JavaScript|
CSS3|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....