这是现在的样子:
当我禁用0
代码:
.toolong {
width: 80%;
overflow: hidden;
white-space:nowrap;
text-overflow: ellipsis;
}
.shadow {
text-shadow: 2px 2px 2px black, -2px -2px 2px black, 2px -2px 2px black, -2px 2px 2px black, 4px 4px 4px black, -4px -4px 4px black, 4px -4px 4px black, -4px 4px 4px black;
font-weight: bold;
}
<div cl="col-sm-12">
<h2 cl="pull-right"><span cl="label label-warning">1</span></h2>
<h3 cl="pull-left shadow toolong">
Piotrek z Bagien
<br>
<span><h4 cl="gray shadow">Pinta</h4></span>
<span><h6 cl="gray shadow">India Pale Ale (Poland)</h6></span>
</h3>
</div>
我建议在顶部和左侧添加padding
:
.toolong {
width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-left: 5px;
padding-top: 5px;
}
如果需要,您可以使用负边距将它们重新对齐:
JS Fiddle.toolong {
width: 80%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
padding-left: 5px;
padding-top: 5px;
margin-left: -5px;
margin-top: -5px;
}
本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处
评论列表(45条)