我试图把一个文本字段列表,并在图像(like this)文本在图像列表
我设法使它对上一个列表项,但是当我添加更多的所有文字卡第一个图像字段(like this)
这里是我的代码:
HTML
<ul class="panel">
<li>
<img src="">
<span class="text-field" class="clearfix">
<h2>text</h2>
</span>
</li>
</ul>
CSS
.panel li {display: inline-block; padding-right: 10px;}
.panel li img{width: 100%;}
.text-field {position: absolute; top: 212px; left: 0; width: 100%; }
.text-field h2{color: #fff; background-color: #ff481c; display: inline-block; font-size: 16px; padding: 5px 10px; font-weight: bold; text-transform: uppercase;}
真棒,谢谢! – user2013488 2013-03-20 18:32:19