<div style="background: url('theImages/talentQuote.png') no-repeat center; background-size: 100% 100%; min-height: 125px; min-width: 125px; text-align: center; vertical-align: middle;">
<span style="color: #FFF; font-weight: bold;"><xsl:value-of select="txtQuote" /></span>
</div>
显示此:
如何修改CSS,因此引号始终位于背景图片的中心
试试这个:
<div class="bubble">
<p>blablabla</p>
</div>
.bubble {
position: absolute;
background: #cccccc;
width: 135px;
height: 84px;
display: table;
}
.bubble p {
display: table-cell;
vertical-align: middle;
text-align: center;
}
这是一个小提琴:http : //jsfiddle.net/hLwzymmL/
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句