css的text-overflow与vertical-align与div水平居中

css_text-overflow的使用
含义:检索或设置对象处理溢出内容的方式
注意事项:

Text overflow can only happen on **block** or **inline-block** level elements,
because the element needs to have a width in order to be overflow-ed.
The overflow happens in the direction as determined by the direction property or related attributes.

the elements needs to have
display: block/inline-block,
<length> ,
white-space: nowrap,
overflow: hidden,
text-overflow: ellipsis,//这是以省略号形式处理溢出的字符

-------------------------------
css_vertical-align使用
含义:设置或检索内联元素在行框内的垂直对其方式。
注意事项

position: absolute; display: table-cell; equals display: block; position: absolute;. 1#
And vertical-align only applies to inline/table-cell elements.
display: inline/table-cell

---------------------------------
div水平居中
主要css代码有两个,一个为text-align:center(内容居中),另外一个为margin:0 auto;其两个样式需要配合使用才能实现div盒子的居中显示排版。

原文地址:https://www.cnblogs.com/alisonGavin/p/7159636.html