HTML
以下是代码片段: <div class="img-desc"> <img src="sample.jpg" alt="" /> <cite>Salone del mobile Milano, April 2008 - Peeta</cite> </div>
CSS
以下是代码片段: .img-desc { position: relative; display: block; height:335px; width: 575px; } .img-desc cite { background: #111; filter:alpha(opacity=55); opacity:.55; color: #fff; position: absolute; bottom: 0; left: 0; width: 555px; padding: 10px; border-top: 1px solid #999; }
分享联系我们
扫二维码与项目经理沟通 我们在微信上24小时期待你的声音
感谢您的关注分享“css图片上加层写文字”
烟寒网络真诚为您服务 ,点击客服直接咨询下单.