如何使用css垂直居中的标题?

时间:2017-11-16 09:31:25

标签: html css html5 css3

如何使用css垂直居中的标题?

~/.gradle

enter image description here

1 个答案:

答案 0 :(得分:1)

添加Img标签CSS

vertical-align: middle;



<!DOCTYPE html>
<html>

<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>test page</title>

</head>

<body>
  <div style="padding: 8px 8px 10px;border-bottom: 1px solid #e8e8e8;">

    <a href="#" style="overflow-x: hidden;text-overflow: ellipsis;white-space: nowrap;width: 154px;display: inline-block;">
      <img src="http://i.ytimg.com/p/PL-o37YO_uwcLPmR8QBTegC2BoJ03I3tqe/mqdefault.jpg" style="display: inline-block;width: 30px;height: 30px;border: 1px solid #ddd;border-radius: 50%;overflow: hidden;vertical-align: middle;"> title title title title
      title title title title title title title title title title title title title </a>

    <span style="ctitle;vertical-align: 10px">posttime:2017-11-11 11:21</span> </div>



</body>

</html>
&#13;
&#13;
&#13;