在CSS中使用vertical-align是什么? [英] What is vertical-align used for in CSS?

查看:274
本文介绍了在CSS中使用vertical-align是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程世界和CSS的新手,最近遇到了vertical-align属性。阅读了一些文章,它是什么,我仍然不知道它是什么,你什么时候使用它?



我的理解是,它用于内联元素,如文本,图像等,以及文本或表中的其他内联元素。它们不能用于块元素,如div,h1等。



如果我的理解是正确的,除了垂直对齐文本来说图像或使用下标或上标

解决方案



但是, 正在使我获得upvote,请参阅:





:)


I am new to the world of coding as well as CSS and recently came across the property vertical-align. Having read a number of articles on what it is, I am still clueless on what it is for and when do you use it?

My understanding is that it is used for inline elements such as text, images, etc as well as text or other inline elements in a table. They cannot be used for block element such as div, h1, etc.

If my understanding is right, apart from aligning text vertically to say an image or using subscript or superscript, what other purpose does it serve?

解决方案

However, it's real use is getting me upvotes, see:

:)

这篇关于在CSS中使用vertical-align是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆