我試圖把一個文本字段列表,並在圖像(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